-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add productFlavor support to --livereload --external #5252
Comments
assembleDebug is supposed to build a debug apk for all the configured flavors, isn’t it working? Maybe you have some setting that prevents it from working? |
I understand all flavors are supposed to be built at every save. Is this what you meant? My question is: what if there are more than 10 flavors? All of them will (i.e. should) be built into the .apk at every save? |
No at every save, as you are using live reload the native app is not rebuilt on every save, just the web part and it reloads the WebView without rebuilding the native part. |
Our use case here is to build one flavor at a time since we do some additional configuration for that flavor. The build process fails since it cannot build all of them at the same time. Since the
|
For livereload, it also doesn't make sense to build multiple flavors at once. |
Would it make sense to just build the flavor specified in the config, such that the control of what gets built is dictated by the config, or is there a benefit to also making it configurable in the live reload command? |
I think using what's in config is a good start. Adding that to the livereload is also a nice feature. For example we have a gulp task that will update the |
|
Fair enough, the limitation still exists in Capacitor, so the CLI update will probably not be enough |
closing since the linked PR is merged |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Feature Request
Description
Currently
assembleDebug
is hardcoded so there's no possibility to--livereload --external
a givenproductFlavor
.Platform(s)
Android
Preferred Solution
Change the hardcoded
const gradleArgs = ['assembleDebug'];
(https://github.com/ionic-team/capacitor/blob/main/cli/src/android/run.ts#L22)to a dynamic one, so various
productFlavors
can be generated correctly when using--livereload --external
build args.App should generate
gradleArgs
based on the given productFlavor i.e.assembleVersionADebug
etc.Alternatives
... remove extra product flavours from
build.gradle
while working, then remember copy them back.Additional Context
I'm happy to submit a PR for this.
Something similar was reported here also: #5104
The text was updated successfully, but these errors were encountered: