-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CB-13580: (android) fix build for multiple apks (different product flavors) #417
Conversation
@DavidStrausz Fix the lint errors and I'll merge this in. I tried adding more flavours and it kept crapping the bed on me. I didn't realize that just adding default would get this to work properly again. If you're inclined, you can always send a PR to my Crosswalk repo. It's technically the "official" repo, and if you could get that working, that would win you some serious cred. (And yeah, I'll try to merge it in, because I can do that, even though I'm not technically supposed to). |
@infil00p Done! 👍 Yeah it also took me some time to figure it out. But the migration guide was really useful if read carfully. I will definitely keep that in mind for future contributions, thanks for pointing that out! |
Codecov Report
@@ Coverage Diff @@
## master #417 +/- ##
==========================================
- Coverage 44.01% 43.77% -0.24%
==========================================
Files 17 17
Lines 1679 1688 +9
Branches 304 306 +2
==========================================
Hits 739 739
- Misses 940 949 +9
Continue to review full report at Codecov.
|
@DavidStrausz thank you for this. @infil00p Considering that the combination of the following aspects:
is quite important and that crosswalk usage is considerably high (my estimate, no data), what are the chances of a 6.4.1/6.5.0 coming out soon to include this? I'm interested in your PoV in this subject. |
@fredgalvao The next version of Cordova-Android will be 7.0.0, and this will be a breaking change where we finally update the project structure to work with Android Studio, as opposed to the cobbled legacy project layout that we're using today. I don't have any plans on releasing a 6.4.1 release at this time. Other than Crosswalk, I don't see a pressing need (we have Oreo support already, plugins are decoupled from the platform and people should be migrating from Crosswalk, since we have no guarantee that it'll stay working now that Intel dropped support. |
@infil00p Unfortunately, for some projects, migrating out of crosswalk isn't really a Thanks for the info, and I'm looking forward to 7.0.0. |
Fixing conflict caused by merging apache#417 into master
I'll just let it documented here to anyone looking for a way out, that @dpa99c has taken the initiative to make a plugin that can migrate data from Crosswalk to the system webview, to be used to move out of Crosswalk. https://github.com/dpa99c/cordova-plugin-crosswalk-data-migration |
Did this affect the output path to APKs? I'm seeing that the the output is now: I've created an issue in the relevant place where I am experiencing problems. |
@Robula The output path was not affected, it changed with the gradle upgrade. This PR just fixed how an already output *.apk is found in the |
@DavidStrausz Thank you for the explanation. That is strange as I am seeing a difference in output paths between 6.3.0 and 6.4.0. I'll trash my platforms and plugins and reconfirm. |
Hello folks, foremost, thanks @DavidStrausz for your effort and explanation! But seriously, i know this is symptomatic for the JS world, but introducing breaking changes with a minor release? WTF!? The Ionites do have the cordova dependency declared as ^6.2.3 so after checking out the project from scratch and building it we get a broken build! Due to the Crosswalk issue and due to changed output directories. Now, i guess to rub salt and tequila in my eyes, instead of somehow fleshing out a bugfix release, I'm supposed to ditch Crosswalk and my android < 5 user base!? Seriously? I know that my post is not helpful in anyway and also symptomatic for the JS world, but so be it - I'm defeated. Cheers to all who try to make stuff working! |
CB-13580: (android) fix build for multiple apks (different product flavors) Note from @benjamn: this commit was cherry-picked from version 7.0.0 onto version 6.4.0 in Meteor's fork of cordova-android, since the maintainer has indicated the changes probably will not be back-ported to 6.x: apache#417 (comment) cc @menelike @abernix
This issue has been merged, but this code are not on release 7.0.0 and i still getting flavors error. |
This version of cordova-android includes the PR that previously required us to fork the package: apache/cordova-android#417 The cordova-ios update is just 4.5.4 => 4.5.5, so hopefully entirely backwards compatible. :crossed-fingers:
Platforms affected
cordova-android
What does this PR do?
This PR fixes the build if cdvBuildMultipleApks is set to true by defining
flavorDimensions "default"
inbuild.gradle
and by adapting thefindOutputApksHelper
method inGenericBuilder.js
to recursively scan thebuild/outputs/apk
directory for matching candidates.A positive side-effect of this is that builds with crosswalk will work again :-)
What testing has been done on this change?
I ran the unit tests and the connectedAndroidTest tests and did manual tests of builds with crosswalk (multiple APKs) and builds without crosswalk (single APK).
Checklist