diff --git a/build.gradle.kts b/build.gradle.kts index 0d6fccd72a4..0b20573a777 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 { val childDistTasks = getTasksByName("dist", true) - this@task dependsOn(childDistTasks) diff --git a/gradle.properties b/gradle.properties index 6d3cf38c9e4..22cf7329755 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/gradle.properties.as31 b/gradle.properties.as31 index 3b6606a9c61..fe3c68012fb 100644 --- a/gradle.properties.as31 +++ b/gradle.properties.as31 @@ -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 diff --git a/gradle.properties.as32 b/gradle.properties.as32 index 3a5f9a11ea4..584e60e79ed 100644 --- a/gradle.properties.as32 +++ b/gradle.properties.as32 @@ -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