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 {
|
} else {
|
||||||
logger.warn("Local build profile is active (IC is on, proguard is off). Use -Pteamcity=true to reproduce TC build")
|
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)
|
allTasks.filterIsInstance<org.gradle.jvm.tasks.Jar>().forEach { task ->
|
||||||
is JavaCompile -> task.options.isIncremental = true
|
task.entryCompression = if (kotlinBuildProperties.jarCompression)
|
||||||
is org.gradle.jvm.tasks.Jar -> task.entryCompression = ZipEntryCompression.STORED
|
ZipEntryCompression.DEFLATED
|
||||||
}
|
else
|
||||||
}
|
ZipEntryCompression.STORED
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ class KotlinBuildProperties(
|
|||||||
val proguard: Boolean get() = postProcessing && getBoolean("kotlin.build.proguard", isTeamcityBuild)
|
val proguard: Boolean get() = postProcessing && getBoolean("kotlin.build.proguard", isTeamcityBuild)
|
||||||
|
|
||||||
val jsIrDist: Boolean get() = getBoolean("kotlin.stdlib.js.ir.dist")
|
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"
|
private const val extensionName = "kotlinBuildProperties"
|
||||||
|
|||||||
Reference in New Issue
Block a user