Build: disable incremental compilation for non-TC build

This should bring small performance improvements for CI builds
(since they are not incremental anyway).
This commit is contained in:
Alexey Tsvetkov
2018-06-26 23:31:29 +03:00
parent 5c16633175
commit c73657b38d
4 changed files with 18 additions and 0 deletions
+15
View File
@@ -5,6 +5,7 @@ import java.util.*
import java.io.File
import org.gradle.api.tasks.bundling.Jar
import org.gradle.plugins.ide.idea.model.IdeaModel
import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile
import proguard.gradle.ProGuardTask
@@ -370,6 +371,20 @@ allprojects {
}
}
if (!isTeamcityBuild) {
gradle.taskGraph.whenReady {
for (project in allprojects) {
for (task in project.tasks) {
when (task) {
is AbstractKotlinCompile<*> -> task.incremental = true
}
}
}
logger.warn("Local build profile is active (IC is on, proguard is off). Use -Pteamcity=true to reproduce TC build")
}
}
val dist by task<Copy> {
val childDistTasks = getTasksByName("dist", true) - this@task
dependsOn(childDistTasks)
+1
View File
@@ -5,6 +5,7 @@ org.gradle.jvmargs=-Duser.country=US -Dkotlin.daemon.jvm.options=-Xmx1600m
kotlin.compiler.effectSystemEnabled=true
kotlin.compiler.newInferenceEnabled=true
kotlin.incremental=false
#maven.repository.mirror=http://repository.jetbrains.com/remote-repos/
#bootstrap.kotlin.repo=https://dl.bintray.com/kotlin/kotlin-dev
#bootstrap.kotlin.version=1.1.50-dev-1451
+1
View File
@@ -5,6 +5,7 @@ org.gradle.jvmargs=-Duser.country=US -Dkotlin.daemon.jvm.options=-Xmx1600m
kotlin.compiler.effectSystemEnabled=true
kotlin.compiler.newInferenceEnabled=true
kotlin.incremental=false
#maven.repository.mirror=http://repository.jetbrains.com/remote-repos/
#bootstrap.kotlin.repo=https://dl.bintray.com/kotlin/kotlin-dev
#bootstrap.kotlin.version=1.1.50-dev-1451
+1
View File
@@ -5,6 +5,7 @@ org.gradle.jvmargs=-Duser.country=US -Dkotlin.daemon.jvm.options=-Xmx1600m
kotlin.compiler.effectSystemEnabled=true
kotlin.compiler.newInferenceEnabled=true
kotlin.incremental=false
#maven.repository.mirror=http://repository.jetbrains.com/remote-repos/
#bootstrap.kotlin.repo=https://dl.bintray.com/kotlin/kotlin-dev
#bootstrap.kotlin.version=1.1.50-dev-1451