Turn off JS IC for Kotlin build

See KT-26064
This commit is contained in:
Alexey Tsvetkov
2018-08-13 16:04:12 +03:00
parent ff3278828e
commit 696b05eb6e
+15 -10
View File
@@ -372,19 +372,24 @@ allprojects {
} }
} }
if (!isTeamcityBuild) { gradle.taskGraph.whenReady {
gradle.taskGraph.whenReady { if (isTeamcityBuild) {
for (project in allprojects) { logger.warn("CI build profile is active (IC is off, proguard is on). Use -Pteamcity=false to reproduce local build")
for (task in project.tasks) { for (task in allTasks) {
when (task) { when (task) {
is AbstractKotlinCompile<*> -> task.incremental = true is AbstractKotlinCompile<*> -> task.incremental = false
is JavaCompile -> task.options.isIncremental = true is JavaCompile -> task.options.isIncremental = false
is org.gradle.jvm.tasks.Jar -> task.entryCompression = ZipEntryCompression.STORED
}
} }
} }
} 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)
is JavaCompile -> task.options.isIncremental = true
is org.gradle.jvm.tasks.Jar -> task.entryCompression = ZipEntryCompression.STORED
}
}
} }
} }