Fix Android Extension imports resolution after project reopening (KT-27793)

This commit is contained in:
Yan Zhulanow
2018-10-25 21:23:49 +03:00
parent beba8f215e
commit cd88209cf4
5 changed files with 10 additions and 5 deletions
@@ -68,7 +68,8 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
val module = modelsProvider.findIdeModule(moduleData) ?: continue
val shouldCreateEmptySourceRoots = shouldCreateEmptySourceRoots(nodeToImport, module)
val rootModel = modelsProvider.getModifiableRootModel(module)
for (sourceSetInfo in nodeToImport.kotlinAndroidSourceSets ?: emptyList()) {
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: continue
for (sourceSetInfo in kotlinAndroidSourceSets) {
val compilation = sourceSetInfo.kotlinModule as? KotlinCompilation ?: continue
for (sourceSet in compilation.sourceSets) {
if (sourceSet.platform == KotlinPlatform.ANDROID) {
@@ -64,7 +64,8 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
val module = modelsProvider.findIdeModule(moduleData) ?: continue
val shouldCreateEmptySourceRoots = shouldCreateEmptySourceRoots(nodeToImport, module)
val rootModel = modelsProvider.getModifiableRootModel(module)
for (sourceSetInfo in nodeToImport.kotlinAndroidSourceSets ?: emptyList()) {
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: continue
for (sourceSetInfo in kotlinAndroidSourceSets) {
val compilation = sourceSetInfo.kotlinModule as? KotlinCompilation ?: continue
for (sourceSet in compilation.sourceSets) {
if (sourceSet.platform == KotlinPlatform.ANDROID) {
@@ -68,7 +68,8 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
val module = modelsProvider.findIdeModule(moduleData) ?: continue
val shouldCreateEmptySourceRoots = shouldCreateEmptySourceRoots(nodeToImport, module)
val rootModel = modelsProvider.getModifiableRootModel(module)
for (sourceSetInfo in nodeToImport.kotlinAndroidSourceSets ?: emptyList()) {
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: continue
for (sourceSetInfo in kotlinAndroidSourceSets) {
val compilation = sourceSetInfo.kotlinModule as? KotlinCompilation ?: continue
for (sourceSet in compilation.sourceSets) {
if (sourceSet.platform == KotlinPlatform.ANDROID) {
@@ -79,7 +79,8 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
val module = modelsProvider.findIdeModule(moduleData) ?: continue
val shouldCreateEmptySourceRoots = shouldCreateEmptySourceRoots(nodeToImport, module)
val rootModel = modelsProvider.getModifiableRootModel(module)
for (sourceSetInfo in nodeToImport.kotlinAndroidSourceSets ?: emptyList()) {
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: continue
for (sourceSetInfo in kotlinAndroidSourceSets) {
val compilation = sourceSetInfo.kotlinModule as? KotlinCompilation ?: continue
for (sourceSet in compilation.sourceSets) {
if (sourceSet.platform == KotlinPlatform.ANDROID) {
@@ -68,7 +68,8 @@ class KotlinAndroidGradleMPPModuleDataService : AbstractProjectDataService<Modul
val module = modelsProvider.findIdeModule(moduleData) ?: continue
val shouldCreateEmptySourceRoots = shouldCreateEmptySourceRoots(nodeToImport, module)
val rootModel = modelsProvider.getModifiableRootModel(module)
for (sourceSetInfo in nodeToImport.kotlinAndroidSourceSets ?: emptyList()) {
val kotlinAndroidSourceSets = nodeToImport.kotlinAndroidSourceSets ?: continue
for (sourceSetInfo in kotlinAndroidSourceSets) {
val compilation = sourceSetInfo.kotlinModule as? KotlinCompilation ?: continue
for (sourceSet in compilation.sourceSets) {
if (sourceSet.platform == KotlinPlatform.ANDROID) {