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

@@ -79,11 +79,14 @@ dependencies {
testFixturesImplementation(libs.square.okhttp.mockwebserver)
}
tasks {
withType<Test> {
useJUnitPlatform()
maxHeapSize = "2g"
maxParallelForks = Runtime.getRuntime().availableProcessors()
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC"
}
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"
}