[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:
+5
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user