Commit 7a82842 Sergey Chelombitko
committed
1 parent f28eb21 commit 7a82842 Copy full SHA for 7a82842
File tree 1 file changed +4
-4
lines changed
marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ interface RemoteCacheExtension {
41
41
}
42
42
43
43
internal fun CachePluginConfiguration.initDefaults () {
44
- local.enabled.convention(false )
44
+ local.enabled.convention(true )
45
45
local.removeUnusedEntriesAfterDays.convention(7 )
46
- remote.enabled.convention(false )
46
+ remote.enabled.convention(true )
47
47
remote.push.convention(true )
48
48
}
49
49
@@ -54,14 +54,14 @@ internal fun CachePluginConfiguration.toCacheConfiguration(): CacheConfiguration
54
54
)
55
55
56
56
private fun LocalCacheExtension.toConfig (): LocalCacheConfiguration =
57
- if (enabled.get()) {
57
+ if (directory.isPresent && enabled.get()) {
58
58
LocalCacheConfiguration .Enabled (directory.get().asFile, removeUnusedEntriesAfterDays.get())
59
59
} else {
60
60
LocalCacheConfiguration .Disabled
61
61
}
62
62
63
63
private fun RemoteCacheExtension.toConfig (): RemoteCacheConfiguration =
64
- if (enabled.get()) {
64
+ if (url.isPresent && enabled.get()) {
65
65
RemoteCacheConfiguration .Enabled (
66
66
url = url.get(),
67
67
credentials = credentials.orNull?.toCredentials(),
You can’t perform that action at this time.
0 commit comments