Turn off JS IC for Kotlin build
See KT-26064
This commit is contained in:
+15
-10
@@ -372,19 +372,24 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
if (!isTeamcityBuild) {
|
||||
gradle.taskGraph.whenReady {
|
||||
for (project in allprojects) {
|
||||
for (task in project.tasks) {
|
||||
when (task) {
|
||||
is AbstractKotlinCompile<*> -> task.incremental = true
|
||||
is JavaCompile -> task.options.isIncremental = true
|
||||
is org.gradle.jvm.tasks.Jar -> task.entryCompression = ZipEntryCompression.STORED
|
||||
}
|
||||
gradle.taskGraph.whenReady {
|
||||
if (isTeamcityBuild) {
|
||||
logger.warn("CI build profile is active (IC is off, proguard is on). Use -Pteamcity=false to reproduce local build")
|
||||
for (task in allTasks) {
|
||||
when (task) {
|
||||
is AbstractKotlinCompile<*> -> task.incremental = false
|
||||
is JavaCompile -> task.options.isIncremental = false
|
||||
}
|
||||
}
|
||||
|
||||
} 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user