Can we Inherit AndroidManifest from other buildType?

Viewed 95
android {
    buildTypes {
        release {}
        debug {}
        staging {
            initWith buildTypes.debug
            applicationIdSuffix ".debugStaging"
        }
    }
}

 src/
  -- debug
     - AndroidManifest.xml
  -- release
  -- staging
     - AndroidManifest.xml
  -- main // used for every project
     - AndroidManifest.xml

When apk is built for staging, it doesn't merge/include debug AndroidManifest. Is this expected? If yes, do i need to copy debug AndroidManifest into staging AndroidManifest? In case of classes and resources, it allows to specify multiple sources but not for AndroidManifest.

    sourceSets {
        staging {
            java.srcDirs = ['src/debug/java', 'src/staging/java']
            res.srcDirs = ['src/staging/res', 'src/debug/res']
        }
    }
1 Answers

I don't know whether the following answer will help, however it does at least explain clearly how to include an AndroidManifest.xml for a build type https://stackoverflow.com/a/25510481/340175

I won't copy paste the contents at this stage given it's untested for your scenario.

Related