Skip to content
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!: bump Gradle 7.6 & AGP 7.4.2 #1539

Merged
merged 5 commits into from Apr 12, 2023
Merged

Conversation

erisu
Copy link
Member

@erisu erisu commented Jan 11, 2023

Motivation and Context

Use latest available Gradle & Android Gradle Plugin

Description

Updated the following versions:

Gradle: 7.6
Android Gradle Plugin: 7.4.2 (Current)

Testing

n/a

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@erisu erisu added this to the 12.0.0 milestone Jan 11, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 11, 2023

Codecov Report

Merging #1539 (89ff097) into master (c201343) will increase coverage by 0.25%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1539      +/-   ##
==========================================
+ Coverage   72.13%   72.38%   +0.25%     
==========================================
  Files          21       23       +2     
  Lines        1751     1767      +16     
==========================================
+ Hits         1263     1279      +16     
  Misses        488      488              
Impacted Files Coverage Δ
lib/AndroidManifest.js 100.00% <ø> (ø)
lib/AndroidProject.js 61.11% <100.00%> (ø)
lib/builders/ProjectBuilder.js 69.62% <100.00%> (-1.12%) ⬇️
lib/config/CordovaGradleConfigParser.js 100.00% <100.00%> (ø)
lib/config/CordovaGradleConfigParserFactory.js 100.00% <100.00%> (ø)
lib/create.js 94.44% <100.00%> (+0.11%) ⬆️
lib/prepare.js 46.55% <100.00%> (+0.26%) ⬆️
lib/run.js 93.54% <100.00%> (+0.44%) ⬆️
lib/target.js 91.66% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jcesarmobile
Copy link
Member

Should we go with gradle 8? It’s already available and recommended by android studio Flamingo, which is still in beta but will be released in the coming months

@erisu
Copy link
Member Author

erisu commented Mar 9, 2023

@jcesarmobile I would like to go with Gradle 8 as soon as it is out of beta.

I started merging in the next major PRs. I will also be preparing and working on the tooling majors simultaneously. In the meantime, we could delay the release while working on tooling and hope Android Gradle Plugin 8's official release is done.

Also, isn't there a release candidate stage? I am wondering if it will take longer than we hope.

Additionally, we could just merge what we have now for testing (nightly) and then create another PR as soon as Gradle 8 is available.

@erisu erisu marked this pull request as ready for review March 9, 2023 10:09
@jcesarmobile
Copy link
Member

Gradle 8 is final, what is beta is the android studio version that recommends using gradle 8

@erisu
Copy link
Member Author

erisu commented Mar 9, 2023

Sorry, I am talking about Android Gradle Plugin 8.0 for Gradle 8.0 support

The current released plugin does not support Gradle 8.0. The Android Gradle Plugin 8.0 is still in beta and has not reached release candidate stage.

@jcesarmobile
Copy link
Member

Where do you see that it’s still beta?

here it says latest is 8.1 and doesn’t say anything about being beta
https://developer.android.com/studio/releases/gradle-plugin

Electric Eel requires a plugin version between 3.2-7.4

So not sure if using 8 or 8.1 will cause issues

@erisu
Copy link
Member Author

erisu commented Mar 9, 2023

@jcesarmobile https://developer.android.com/reference/tools/gradle-api this is where I read that AGP 8 still beta and the page was last updated 3 days ago.

@jcesarmobile
Copy link
Member

ah, cool, then yeah, we should wait

@erisu erisu changed the title feat: bump Gradle 7.6 & AGP 7.3.1 feat: bump Gradle 7.6 & AGP 7.4.2 Mar 10, 2023
@erisu erisu marked this pull request as draft March 10, 2023 18:20
@erisu
Copy link
Member Author

erisu commented Mar 10, 2023

Currently trying to change how handle the package name.

erisu@83b9449

One of the newer versions of AGP deprecated setting the package name in AndroidManifest file. There is a print out about this deprecation.

The commit above is my current changes but there are still a few other areas that looks at AndroidManifest for the package name, including the testing.

@erisu
Copy link
Member Author

erisu commented Mar 28, 2023

@jcesarmobile, Android Gradle Plugin 8.0 has entered the release candidate stage.

Also, If we were to upgrade to AGP 8.0 in this release, it have to force everyone up to JDK 17. AGP 8.0 requires JDK 17.

Also, Android Studio Flamingo will bundle JDK 17. Flamingo is not in beta stage. It is still in the canary stage.

I still dont have an exact ETA for the Android release, but must be released no later then July for Google's August requirements.

I think we sometimes explain that users can and maybe should use the JDK version that is bundled with Android Studio, but I am nto sure if Flamingo will be avaialble before AGP 8.0 is released.

Maybe more documentation in how to support JDK 17 + JDK 11...

@jcesarmobile
Copy link
Member

flamingo is RC, at least the macOS version
https://developer.android.com/studio/preview

Android Studio Flamingo | 2022.2.1 RC 1

pretty sure they match the gradle plugin versions with the Android studio version

@erisu
Copy link
Member Author

erisu commented Mar 28, 2023

Awesome. I guess all pages were not updated. This page still says beta.

And the part where I read canary was a misunderstanding. It was when JDK 17 was bundled with Android Studio.

* fix!: remove deprecated package name from AndroidManifest
* fix: package name
* fix: rename CordovaGradleConfigParser's _save to write
* test: fix CordovaGradleConfigParser related specs
* fix: test refactoring for gradle namespace

Co-authored-by: Norman Breau <norman@nbsolutions.ca>
@erisu erisu marked this pull request as ready for review April 8, 2023 17:09
@erisu erisu changed the title feat: bump Gradle 7.6 & AGP 7.4.2 feat!: bump Gradle 7.6 & AGP 7.4.2 Apr 8, 2023
@erisu
Copy link
Member Author

erisu commented Apr 8, 2023

I will go ahead and open up this PR for a review and move forward with merging it in.

Since this PR contians code changes for fixing things that were deprecated in the recent 7.x bump, I will recommend a second PR that focuses on AGP 8.0 and Gradle 8.0.

@breautek
Copy link
Contributor

breautek commented Apr 8, 2023

Tested on a hello world app.

@erisu erisu merged commit a9d4d4e into apache:master Apr 12, 2023
6 checks passed
@erisu erisu deleted the feat/gradle-7.x-bump branch April 12, 2023 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants