-
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
[MAJOR] Gradle upgrade from 4.10.3 to 6.x #792
Conversation
This PR is intended for the android 9.x milestone. |
Codecov Report
@@ Coverage Diff @@
## master #792 +/- ##
=======================================
Coverage 66.17% 66.17%
=======================================
Files 19 19
Lines 1839 1839
=======================================
Hits 1217 1217
Misses 622 622
Continue to review full report at Codecov.
|
We should open an issue for this so this can get fixed.
So nothing we can do about? |
Not really. There is an open bug ticket on Android Issue Tracker.
I could just add an npm script to do this for you, so that we can just use something like |
I think |
Actually ran into an issue on "cleaning" I think windows have different commands for using using So I think the best way to handle this is to use a task system such as |
The command above should work on all platforms: linux, macOS (tested), and Windows (tested). |
I've added a clean script that does So anybody with existing repositories can now simply run |
This assumes 1) that the project is currently being managed under git, and 2) that the developer does not have any untracked or uncommitted work anywhere in the current git repository (which may be tracking files and folders beyond the scope of the package.json that this command is in). I think this is a bad idea. Unless I am misunderstanding the target user for the |
The clean command is something that a developer would use when working in the However, there is some annoying dangers. I've incorporated using git clean in my workflow in another project and accidentally deleted newly added but untracked files. So maybe just writing a gulp script might be better, to avoid accidents like that. |
@erisu FYI, I opted away from the Due to this danger I decided to replace it with a |
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! I'd like another maintainer to have a look, too, though. :)
This PR is intended for |
LGTM for 9.0. I did verify from [1] that this proposal is referencing the most recent Gradle version to date. Here are my personal feelings:
I wonder if we should discuss in [email protected] before merging? |
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 👍
This works for me. |
I do not recommend merging this PR into master until we are ready to prepare the next major release. There is no official release date and from various discussions is looking to be more around mid-January to early February. It is better to keep master available for potential future minor or patch releases until then. |
Note to myself: #834 (comment) may be affected by this PR. I should double check this. |
Gradle 6.0 is out. |
Definitely worth looking into. |
…ore fine control over which files needing to be 'cleaned'
…lean test gradle installation
Upgraded android gradle plugin to version 3.5.2 (current stable) Removed useDeprecatedNdk as this option is now completely removed from gradle.
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.
I performed the following test.
cordova create testApp
cordova platform add github:breautek/cordova-android\#gradle-5.x
cordova build android
cordova run android
I also opened the project in Android Studio and the Android project synced successfully with out any errors or warnings. As a side note, it is always recommended to build the application once with the cordova run build
command before opening the projects platforms/android
directory in Android Studio so it can checkout Gradle wrapper file.
In Android Studio, I confirmed that I am able to build (Make project
) and run the app.
@erisu command "cordova platform add github:breautek/cordova-android\#gradle-5.x" not work for me.. Any solution ?
|
@wilywork Try |
There might a difference between the Windows and Linux/macOS syntax when passing in the GitHub URL. For example, I escape the Additionally, since this PR had been merged, you can use the Apache repo instead. I would not recommend using his branch as he could delete the branch at any time. Try what @RafaelKr suggested. Lastly, please note that we do not consider or suggest using the master branch in production. Master is still an active development branch and would not go through an official release vote. Testing and reporting is always welcomed. |
You can only use Additionally, because this PR is merged in, I'll be deleting my Thanks @erisu for picking this up. |
@breautek No, I also thought the problem comes from using SSH. But @erisu mentioned the escaped # and that's right. His log says @wilywork try this: Edit: @erisu pointed out using the master branch is not suggested. To get exactly the current state I included the specific commit id (8ef742e). |
Platforms affected
Android
Motivation and Context
Updates gradle version to the latest release (currently 6.1). It solves a few issue tickets that supposedly was caused after upgrading Android Studio.
Fixes #780
Fixes #754
Fixes #718
Fixes #834
Description
Changed the desired gradle version from 4.10.3 to 6.1
Testing
I have tested using
npm test
and all tests passed. Note that if you have rannpm test
before, you will need to remove the/test/gradlew
file so the test project will download the new gradle version.I have also tested by creating a brand new cordova app, and adding the
cordova-android
platform by usingcordova platform add https://github.com/breautek/cordova-android.git#gradle-5.x
Then running the
cordova build android
command.I'd also like to make a note that gradle 5.5.1 does currently produce a warning stating:
Running gradlew manually with
--verbose --stacktrace
shows the code triggering the warning is android internal code.Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)