cordova-android icon indicating copy to clipboard operation
cordova-android copied to clipboard

Doesn't support add customised `buildType`?

Open zhaoyi0113 opened this issue 5 years ago • 2 comments

I am trying to add a new buildType in my android application. I edited build-extras.gradle as below

android {
    buildTypes {
    
        staging {
            initWith release
        }
    }
}

After that the change is added to platforms/android/build-extras.gradle but the build will fail because the module platforms/android/CordovaLib/build.gradle doesn't have such configuration. If I added the this configuration on platforms/android/CordovaLib/build.gradle manually, the command cordova build android --release will success but it doesn't generate the staging APK.

zhaoyi0113 avatar Nov 26 '18 08:11 zhaoyi0113

Did you solve it?

ronytesler avatar Aug 12 '19 12:08 ronytesler

I am interested in a solution for this as well.

romaia avatar Oct 15 '21 13:10 romaia

You should be able to use

staging {
    matchingFallbacks = ['release']
}

That should fallback to the release build when the staging flavor is not available

jcesarmobile avatar Dec 02 '23 23:12 jcesarmobile