[Build] Fix configuration cache issues (part 1)

* Make `clean` task compatible with configuration cache
* Make Java compile instrumentation compatible with configuration cache
* Make settings.gradle compatible with configuration cache
* Initial work on making IntelliJInstrumentCodeTask compatible with configuration cache
* Make writeStdlibVersion task compatible with configuration cache
* Copy some properties to not capture it's owning object into lambda to support configuration cache

Relates to #KT-44611
This commit is contained in:
Alexander Likhachev
2021-01-29 05:44:51 +03:00
parent 111e67dc8d
commit 27956adf3f
11 changed files with 120 additions and 88 deletions
+5 -4
View File
@@ -16,17 +16,18 @@ val runtimeElements by configurations.creating {
}
val JDK_18: String by rootProject.extra
val toolsJarFile = toolsJarFile(jdkHome = File(JDK_18)) ?: error("Couldn't find tools.jar in $JDK_18")
val usedInternalApiPackages = listOf(
"com/sun/tools/javac" // Used in KAPT
)
val toolsJarStubs by tasks.registering {
val toolsJarFile = toolsJarFile(jdkHome = File(JDK_18)) ?: error("Couldn't find tools.jar in $JDK_18")
inputs.file(toolsJarFile)
val outDir = buildDir.resolve(name)
outputs.dir(outDir)
val usedInternalApiPackages = listOf(
"com/sun/tools/javac" // Used in KAPT
)
doLast {
outDir.deleteRecursively()
val zipFile = ZipFile(toolsJarFile)