Application package from manifest file has a higher priority than the applicationId value in build.gradle (KT-10320)
This commit is contained in:
+5
-2
@@ -38,8 +38,11 @@ public class AndroidSubplugin : KotlinGradleSubplugin {
|
||||
|
||||
val mainSourceSet = sourceSets.getByName("main")
|
||||
val manifestFile = mainSourceSet.manifest.srcFile
|
||||
val applicationPackage = androidExtension.defaultConfig.applicationId
|
||||
?: getApplicationPackageFromManifest(manifestFile) ?: ""
|
||||
val applicationPackage = getApplicationPackageFromManifest(manifestFile) ?: run {
|
||||
project.logger.warn(
|
||||
"Application package name is not present in the manifest file (${manifestFile.absolutePath})")
|
||||
""
|
||||
}
|
||||
pluginOptions += SubpluginOption("package", applicationPackage)
|
||||
|
||||
fun addVariant(sourceSet: AndroidSourceSet) {
|
||||
|
||||
Reference in New Issue
Block a user