Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ open class IDEAndroidCommonLayoutXmlFileManager(val module: Module) : AndroidLay

private fun SourceProviderMirror.toVariant() = let {
val list = resDirectories.mapNotNull { it.canonicalPath }
val fixedName = if (name != "") name else "main" // IdeaSourceProvider's for legacy projects rename the main source set.
val fixedName = name.ifEmpty { "main" } // IdeaSourceProvider's for legacy projects rename the main source set.
AndroidVariant(fixedName, list)
}

Expand All @@ -120,4 +120,4 @@ open class IDEAndroidCommonLayoutXmlFileManager(val module: Module) : AndroidLay
}
return AndroidModule(applicationPackage, sourceProviders.map { it.toVariant() })
}
}
}