Fix dependency resolution on model post-processing
#KT-27265 Fixed
This commit is contained in:
+6
-1
@@ -68,7 +68,7 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
|
||||
val module = modelsProvider.findIdeModule(moduleData) ?: continue
|
||||
val shouldCreateEmptySourceRoots = shouldCreateEmptySourceRoots(nodeToImport, module)
|
||||
val rootModel = modelsProvider.getModifiableRootModel(module)
|
||||
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: continue
|
||||
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: emptyList()
|
||||
for (sourceSetInfo in kotlinAndroidSourceSets) {
|
||||
val compilation = sourceSetInfo.kotlinModule as? KotlinCompilation ?: continue
|
||||
for (sourceSet in compilation.sourceSets) {
|
||||
@@ -82,6 +82,11 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
|
||||
}
|
||||
addExtraDependeeModules(nodeToImport, projectNode, modelsProvider, rootModel, false)
|
||||
addExtraDependeeModules(nodeToImport, projectNode, modelsProvider, rootModel, true)
|
||||
|
||||
if (nodeToImport.kotlinAndroidSourceSets == null) {
|
||||
continue
|
||||
}
|
||||
|
||||
val androidModel = getAndroidModuleModel(nodeToImport) ?: continue
|
||||
val variantName = androidModel.selectedVariant.name
|
||||
val activeSourceSetInfos = nodeToImport.kotlinAndroidSourceSets?.filter { it.kotlinModule.name.startsWith(variantName) } ?: emptyList()
|
||||
|
||||
+6
-1
@@ -68,7 +68,7 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
|
||||
val module = modelsProvider.findIdeModule(moduleData) ?: continue
|
||||
val shouldCreateEmptySourceRoots = shouldCreateEmptySourceRoots(nodeToImport, module)
|
||||
val rootModel = modelsProvider.getModifiableRootModel(module)
|
||||
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: continue
|
||||
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: emptyList()
|
||||
for (sourceSetInfo in kotlinAndroidSourceSets) {
|
||||
val compilation = sourceSetInfo.kotlinModule as? KotlinCompilation ?: continue
|
||||
for (sourceSet in compilation.sourceSets) {
|
||||
@@ -82,6 +82,11 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
|
||||
}
|
||||
addExtraDependeeModules(nodeToImport, projectNode, modelsProvider, rootModel, false)
|
||||
addExtraDependeeModules(nodeToImport, projectNode, modelsProvider, rootModel, true)
|
||||
|
||||
if (nodeToImport.kotlinAndroidSourceSets == null) {
|
||||
continue
|
||||
}
|
||||
|
||||
val androidModel = getAndroidModuleModel(nodeToImport) ?: continue
|
||||
val variantName = androidModel.selectedVariant.name
|
||||
val activeSourceSetInfos = nodeToImport.kotlinAndroidSourceSets?.filter { it.kotlinModule.name.startsWith(variantName) } ?: emptyList()
|
||||
|
||||
+6
-1
@@ -79,7 +79,7 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
|
||||
val module = modelsProvider.findIdeModule(moduleData) ?: continue
|
||||
val shouldCreateEmptySourceRoots = shouldCreateEmptySourceRoots(nodeToImport, module)
|
||||
val rootModel = modelsProvider.getModifiableRootModel(module)
|
||||
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: continue
|
||||
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: emptyList()
|
||||
for (sourceSetInfo in kotlinAndroidSourceSets) {
|
||||
val compilation = sourceSetInfo.kotlinModule as? KotlinCompilation ?: continue
|
||||
for (sourceSet in compilation.sourceSets) {
|
||||
@@ -93,6 +93,11 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
|
||||
}
|
||||
addExtraDependeeModules(nodeToImport, projectNode, modelsProvider, rootModel, false)
|
||||
addExtraDependeeModules(nodeToImport, projectNode, modelsProvider, rootModel, true)
|
||||
|
||||
if (nodeToImport.kotlinAndroidSourceSets == null) {
|
||||
continue
|
||||
}
|
||||
|
||||
val androidModel = getAndroidModuleModel(nodeToImport) ?: continue
|
||||
val variantName = androidModel.selectedVariant.name
|
||||
val activeSourceSetInfos = nodeToImport.kotlinAndroidSourceSets?.filter { it.kotlinModule.name.startsWith(variantName) } ?: emptyList()
|
||||
|
||||
+6
-1
@@ -68,7 +68,7 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
|
||||
val module = modelsProvider.findIdeModule(moduleData) ?: continue
|
||||
val shouldCreateEmptySourceRoots = shouldCreateEmptySourceRoots(nodeToImport, module)
|
||||
val rootModel = modelsProvider.getModifiableRootModel(module)
|
||||
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: continue
|
||||
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: emptyList()
|
||||
for (sourceSetInfo in kotlinAndroidSourceSets) {
|
||||
val compilation = sourceSetInfo.kotlinModule as? KotlinCompilation ?: continue
|
||||
for (sourceSet in compilation.sourceSets) {
|
||||
@@ -82,6 +82,11 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
|
||||
}
|
||||
addExtraDependeeModules(nodeToImport, projectNode, modelsProvider, rootModel, false)
|
||||
addExtraDependeeModules(nodeToImport, projectNode, modelsProvider, rootModel, true)
|
||||
|
||||
if (nodeToImport.kotlinAndroidSourceSets == null) {
|
||||
continue
|
||||
}
|
||||
|
||||
val androidModel = getAndroidModuleModel(nodeToImport) ?: continue
|
||||
val variantName = androidModel.selectedVariant.name
|
||||
val activeSourceSetInfos = nodeToImport.kotlinAndroidSourceSets?.filter { it.kotlinModule.name.startsWith(variantName) } ?: emptyList()
|
||||
|
||||
Reference in New Issue
Block a user