phatpaul opened a new issue #1134:
URL: https://github.com/apache/cordova-android/issues/1134


   # Feature Request: Build Variants
   
   ## Motivation Behind Feature
   <!-- Why should this feature be implemented? What problem does it solve? -->
   I would like the ability to create a development test version of my app.  
The dev version of the app should be able to be installed on devices alongside 
the latest release version.  To allow this, I must change the app id to 
something unique.  I also want to change the name to "appname-dev" to 
distinguish it from the release version on the user's app launcher.
   
   Native Android has variants: 
https://developer.android.com/studio/build/build-variants
   
   Native iOS has targets: 
https://developer.apple.com/library/archive/documentation/ToolsLanguages/Conceptual/Xcode_Overview/WorkingwithTargets.html
   
   I searched and found some other people expressing similar interest:
   
https://stackoverflow.com/questions/35731142/build-variants-with-ionic-cordova
   
https://stackoverflow.com/questions/53521813/manage-multiple-build-variants-using-cordova-ionic-android-prject
   
   ## Feature Description
   <!-- 
   Describe your feature request in detail
   Please provide any code examples or screenshots of what this feature would 
look like
   Are there any drawbacks? Will this break anything for existing users? 
   -->
   I want to be able to specify a build variant (or target?) on the CLI. 
   ```
   cordova build android --variant=dev
   ```
   That would change the built app's widget id to "com.myco.appname_dev" and 
the name to "appname-dev".
   
   To make this feature more general-purpose, perhaps the variants are defined 
in a file and each selects a separate config.xml.
   
   ## Alternatives or Workarounds
   <!-- 
   Describe alternatives or workarounds you are currently using 
   Are there ways to do this with existing functionality?
   -->
   Currently I am editing config.xml by hand to change the id and name 
properties.  But it is error-prone and tedious.
   Also, each time I change the ID, it seems I have to remove and re-add the 
platforms to avoid build errors.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to