[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
+2 -1
View File
@@ -61,10 +61,11 @@ ext.compileJava9Sources = { Project project, String moduleName, Collection<FileC
it.options.fork = true
it.options.forkOptions.javaHome = file(JDK_9)
it.options.sourcepath = files(java9SourceSet.srcDirs)
def compileClasspath = project.configurations.java9CompileClasspath
doFirst {
def moduleFiles = files(*moduleOutputs)
def modulePath = project.configurations.java9CompileClasspath.filter { !(it in moduleFiles.files) }
def modulePath = compileClasspath.filter { !(it in moduleFiles.files) }
options.compilerArgs = [
'--module-path', modulePath.asPath,