[Build] Fix configuration cache issues (part 3)
* Make IntelliJInstrumentCodeTask compatible with configuration cache * Make CoreXmlShadingTransformer compatible with configuration cache * Make :kotlin-reflect:relocateCoreSources 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:
@@ -4,6 +4,7 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer
|
||||
import com.github.jengelman.gradle.plugins.shadow.transformers.TransformerContext
|
||||
import kotlinx.metadata.jvm.KmModuleVisitor
|
||||
import kotlinx.metadata.jvm.KotlinModuleMetadata
|
||||
import org.gradle.kotlin.dsl.support.serviceOf
|
||||
import shadow.org.apache.tools.zip.ZipEntry
|
||||
import shadow.org.apache.tools.zip.ZipOutputStream
|
||||
|
||||
@@ -157,8 +158,12 @@ val proguard by task<CacheableProguardTask> {
|
||||
}
|
||||
|
||||
val relocateCoreSources by task<Copy> {
|
||||
val relocatedCoreSrc = relocatedCoreSrc
|
||||
val fs = serviceOf<FileSystemOperations>()
|
||||
doFirst {
|
||||
delete(relocatedCoreSrc)
|
||||
fs.delete {
|
||||
delete(relocatedCoreSrc)
|
||||
}
|
||||
}
|
||||
|
||||
from("$core/descriptors/src")
|
||||
|
||||
@@ -76,6 +76,9 @@ val jsMainSources by task<Sync> {
|
||||
|
||||
into("$buildDir/jsMainSources")
|
||||
|
||||
val unimplementedNativeBuiltIns = unimplementedNativeBuiltIns
|
||||
val buildDir = buildDir
|
||||
val builtInsHeader = builtInsHeader
|
||||
doLast {
|
||||
unimplementedNativeBuiltIns.forEach { path ->
|
||||
val file = File("$buildDir/jsMainSources/$path")
|
||||
|
||||
Reference in New Issue
Block a user