[Build] Disable custom normalization when conf cache is enabled
Custom input normalizations currently isn't supported by Gracle configuration cache #KT-44611 In Progress
This commit is contained in:
+10
-6
@@ -525,12 +525,16 @@ allprojects {
|
||||
outputs.doNotCacheIf("https://youtrack.jetbrains.com/issue/KTI-112") { true }
|
||||
}
|
||||
|
||||
normalization {
|
||||
runtimeClasspath {
|
||||
ignore("META-INF/MANIFEST.MF")
|
||||
ignore("META-INF/compiler.version")
|
||||
ignore("META-INF/plugin.xml")
|
||||
ignore("kotlin/KotlinVersionCurrentValue.class")
|
||||
if (isConfigurationCacheDisabled) {
|
||||
// Custom input normolization isn't supported by configuration cache at the moment
|
||||
// See https://github.com/gradle/gradle/issues/13706
|
||||
normalization {
|
||||
runtimeClasspath {
|
||||
ignore("META-INF/MANIFEST.MF")
|
||||
ignore("META-INF/compiler.version")
|
||||
ignore("META-INF/plugin.xml")
|
||||
ignore("kotlin/KotlinVersionCurrentValue.class")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,5 +82,8 @@ fun Task.singleOutputFile(): File = when (this) {
|
||||
else -> outputs.files.singleFile
|
||||
}
|
||||
|
||||
val Project.isConfigurationCacheDisabled
|
||||
get() = (gradle.startParameter as? org.gradle.api.internal.StartParameterInternal)?.isConfigurationCache != true
|
||||
|
||||
val Project.isIdeaActive
|
||||
get() = providers.systemProperty("idea.active").forUseAtConfigurationTime().isPresent
|
||||
@@ -10,7 +10,7 @@ import org.gradle.api.logging.Logger
|
||||
import org.gradle.api.tasks.TaskState
|
||||
import java.util.HashMap
|
||||
|
||||
if ((gradle.startParameter as? org.gradle.api.internal.StartParameterInternal)?.isConfigurationCache != true) {
|
||||
if (isConfigurationCacheDisabled) {
|
||||
BuildTimeReporter.configure(gradle)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user