Stop using -Xbuild-file in Gradle Plugin

#KT-27640 fixed
    #KT-27778 fixed
    #KT-27638 fixed
This commit is contained in:
Alexey Tsvetkov
2018-11-02 05:08:48 +03:00
parent 9b5b0447fa
commit 5f54f67f70
12 changed files with 94 additions and 101 deletions
@@ -149,8 +149,12 @@ class GenerationState private constructor(
init {
val icComponents = configuration.get(JVMConfigurationKeys.INCREMENTAL_COMPILATION_COMPONENTS)
if (icComponents != null) {
incrementalCacheForThisTarget =
icComponents.getIncrementalCache(targetId ?: error("Target ID should be specified for incremental compilation"))
val targetId = targetId
?: moduleName?.let {
// hack for Gradle IC, Gradle does not use build.xml file, so there is no way to pass target id
TargetId(it, "java-production")
} ?: error("Target ID should be specified for incremental compilation")
incrementalCacheForThisTarget = icComponents.getIncrementalCache(targetId)
packagesWithObsoleteParts = incrementalCacheForThisTarget.getObsoletePackageParts().map {
JvmClassName.byInternalName(it).packageFqName
}.toSet()