Disable parallel compilation

This commit is contained in:
Him188 2022-04-27 09:51:28 +01:00
parent 00c74ec13f
commit 3ccc07d5f4

View File

@ -48,7 +48,7 @@ fun Project.preConfigureJvmTarget() {
// Using /2 processors: jvm and android targets are compiled at the same time, sharing the processors.
// Also reserved 2 processors for Gradle multi-tasking
// On Apple M1 Max parallelism reduces compilation time by 1/3.
kotlinOptions.freeCompilerArgs += "-Xbackend-threads=" + (Runtime.getRuntime().availableProcessors() / 2 - 1).coerceAtLeast(1)
// kotlinOptions.freeCompilerArgs += "-Xbackend-threads=" + (Runtime.getRuntime().availableProcessors() / 2 - 1).coerceAtLeast(1)
}
tasks.withType(JavaCompile::class.java) {