Build: Add kotlin.build.jar.compression property
Is `true` on teamcity and `false` locally by default #KT-32573
This commit is contained in:
+7
-7
@@ -417,13 +417,13 @@ gradle.taskGraph.whenReady {
|
||||
}
|
||||
} else {
|
||||
logger.warn("Local build profile is active (IC is on, proguard is off). Use -Pteamcity=true to reproduce TC build")
|
||||
for (task in allTasks) {
|
||||
when (task) {
|
||||
// todo: remove when Gradle 4.10+ is used (Java IC on by default)
|
||||
is JavaCompile -> task.options.isIncremental = true
|
||||
is org.gradle.jvm.tasks.Jar -> task.entryCompression = ZipEntryCompression.STORED
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
allTasks.filterIsInstance<org.gradle.jvm.tasks.Jar>().forEach { task ->
|
||||
task.entryCompression = if (kotlinBuildProperties.jarCompression)
|
||||
ZipEntryCompression.DEFLATED
|
||||
else
|
||||
ZipEntryCompression.STORED
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,8 @@ class KotlinBuildProperties(
|
||||
val proguard: Boolean get() = postProcessing && getBoolean("kotlin.build.proguard", isTeamcityBuild)
|
||||
|
||||
val jsIrDist: Boolean get() = getBoolean("kotlin.stdlib.js.ir.dist")
|
||||
|
||||
val jarCompression: Boolean get() = getBoolean("kotlin.build.jar.compression", isTeamcityBuild)
|
||||
}
|
||||
|
||||
private const val extensionName = "kotlinBuildProperties"
|
||||
|
||||
Reference in New Issue
Block a user