-
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
fix(android): move MainActivity.java to folder that tracks the app package name (widget id) #1154
fix(android): move MainActivity.java to folder that tracks the app package name (widget id) #1154
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1154 +/- ##
==========================================
+ Coverage 71.80% 73.80% +1.99%
==========================================
Files 21 21
Lines 1745 1752 +7
==========================================
+ Hits 1253 1293 +40
+ Misses 492 459 -33
Continue to review full report at Codecov.
|
I was attempting to do the same thing that you are doing, but discover the same problem that this pr want to fix. |
Hi @wedgberto I would like to include this with our next Kind regards, |
I'll rebase and check comments in the next few days
Regards,
David Wedgbury
…On Wed, 11 May 2022, 16:41 Norman Breau, ***@***.***> wrote:
Hi @wedgberto <https://github.com/wedgberto>
I would like to include this with our next 11.x release, but as this PR
is old and didn't get much attention when it should have, it will need to
be rebased. Do you think you'll have time in the upcoming weeks to rebase?
If not, do I have permission to rebase/cherry-pick your commits to get
these changes in?
Kind regards,
Norman
—
Reply to this email directly, view it on GitHub
<#1154 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABH6IIGUHVIJSVHK65MA2DTVJPIKDANCNFSM4WKLSPEQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks! Please ping me when it's ready. |
37d550e
to
5ee340c
Compare
5ee340c
to
98f4fb1
Compare
@breautek PR is now up to date with master |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1154 +/- ##
==========================================
+ Coverage 73.20% 75.90% +2.69%
==========================================
Files 21 21
Lines 1646 1656 +10
==========================================
+ Hits 1205 1257 +52
+ Misses 441 399 -42 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good, tested it locally and everything seems to work as expected + unit tests including your new unit tests passes.
I've just have one nit pick where you're using a package that isn't declared as a cordova-android dependency.
Thanks for your effort into preparing this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
All checks remain green. Thank you @erisu for your green check and thank you @wedgberto for your effort into preparing this PR! |
Platforms affected
Android
Motivation and Context
Cordova has built in hook functionality that enables customisation of the build. My project has used this hook feature to change the package name via the build command line arguments so that the app can be built with the same code but different package names. e.g. io.cordova.helloworld can be installed and ran alongside io.cordova.helloworld2.
This is very useful for installing test, UAT or beta releases side by side. This was possible in [email protected] but was broken by changes made in 9.0.0.
When the package name of the project is changed in config.xml after a cordova build has completed, and before another build, the MainActivity.Java file is no longer moved to a folder that tracks the package name and ends up being removed.
This leads to an app crash when launched because the source code for a class that extends CordovaActivity no longer exists.
Subsequent build attempts of the project fail because the source code for a class that extends CordovaActivity is missing from the project.
Fixes #1139
Description
This PR reinstates code that took care of moving the Java source code file containing the class that extends CordovaActivity to a folder path that matches the app's package name (e.g. app/src/main/java/io/cordova/helloworld).
Testing
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)