Optimize build times (#6418)

This commit is contained in:
David Perez
2026-01-27 13:01:20 -06:00
committed by GitHub
parent 66316e4bd2
commit 954571ff4a
11 changed files with 105 additions and 61 deletions

View File

@@ -260,10 +260,16 @@ protobuf {
}
}
tasks {
withType<Test> {
useJUnitPlatform()
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
@Suppress("MagicNumber")
forkEvery = 100
maxHeapSize = "2g"
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" +
// Explicitly setting the user Country and Language because tests assume en-US
"-Duser.country=US" +
"-Duser.language=en"
}
private fun renameFile(path: String, newName: String) {