[Gradle] Declare kotlin.caching.enabled system property read
#KT-49107 Fixed
This commit is contained in:
committed by
Space
parent
f9d4e0639c
commit
1160e3875a
+2
-2
@@ -17,9 +17,9 @@
|
||||
package org.jetbrains.kotlin.gradle.tasks
|
||||
|
||||
import org.gradle.api.Task
|
||||
import org.jetbrains.kotlin.gradle.utils.getSystemProperty
|
||||
|
||||
internal fun isBuildCacheEnabledForKotlin(): Boolean =
|
||||
System.getProperty(KOTLIN_CACHING_ENABLED_PROPERTY)?.toBoolean() ?: true
|
||||
private fun Task.isBuildCacheEnabledForKotlin(): Boolean = project.getSystemProperty(KOTLIN_CACHING_ENABLED_PROPERTY)?.toBoolean() ?: true
|
||||
|
||||
internal fun <T : Task> T.cacheOnlyIfEnabledForKotlin() {
|
||||
outputs.cacheIf { isBuildCacheEnabledForKotlin() }
|
||||
|
||||
Reference in New Issue
Block a user