Adopt configuration-avoidance where possible

Before this change `./gradlew help` (with native enabled)
Created immediately: 1322
Created during configuration: 1541

after this change:
Created immediately: 596
Created during configuration: 1509

To know more about configuration avoidance: https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
This commit is contained in:
cristiangarcia
2023-06-06 14:27:42 +00:00
committed by Space Team
parent ad8909113d
commit 46d113605b
33 changed files with 623 additions and 609 deletions
+2 -4
View File
@@ -65,15 +65,13 @@ benchmark {
}
}
tasks.matching { it is Zip && it.name == "mainBenchmarkJar" }.configureEach {
this as Zip
tasks.withType<Zip>().matching { it.name == "mainBenchmarkJar" }.configureEach {
isZip64 = true
archiveFileName.set("benchmarks.jar")
}
val benchmarkTasks = listOf("mainBenchmark", "mainFirBenchmark", "mainNiBenchmark")
tasks.matching { it is JavaExec && it.name in benchmarkTasks }.configureEach {
this as JavaExec
tasks.withType<JavaExec>().matching { it.name in benchmarkTasks }.configureEach {
dependsOn(":createIdeaHomeForTests")
systemProperty("idea.home.path", ideaHomePathForTests().canonicalPath)
systemProperty("idea.use.native.fs.for.win", false)