Automattic / stories-android

Loop concept app - WP Stories library
GNU General Public License v2.0
17 stars 6 forks source link

[Build] Upgrade Gradle to 8.2.1 and AGP to 8.1.0 #738

Closed ParaskP7 closed 11 months ago

ParaskP7 commented 12 months ago

Platform Request: pdnsEh-13V-p2 Project Thread: paaHJt-57Z-p2

This PR upgraded Gradle to 8.2.1 and AGP to 8.0.2.

FYI: The 8.1.1 Gradle upgrades had to happen in 2 parts (9848f1780f6109f723c561536653063fb44df097 and 8f176b09210f01cffd3e9da9be969c6952da6304). This is because of the breaking changes that this upgrade introduces, including the AGP upgrade and its associated breaking changes (namespace, build option, etc).


🚫 Blocked By:

CI Failure ``` [2023-07-12T11:41:19Z] FAILURE: Build failed with an exception. --   | [2023-07-12T11:41:19Z]   | [2023-07-12T11:41:19Z] * Where:   | [2023-07-12T11:41:19Z] Build file '/var/lib/buildkite-agent/builds/ci-android-i-00498079ce90318ff-1/automattic/stories-android/app/build.gradle' line: 2   | [2023-07-12T11:41:19Z]   | [2023-07-12T11:41:19Z] * What went wrong:   | [2023-07-12T11:41:19Z] An exception occurred applying plugin request [id: 'com.android.application', version: '8.0.2']   | [2023-07-12T11:41:19Z] > Failed to apply plugin 'com.android.internal.application'.   | [2023-07-12T11:41:19Z] > Android Gradle plugin requires Java 17 to run. You are currently using Java 11.   | [2023-07-12T11:41:19Z] Your current JDK is located in /usr/lib/jvm/java-11-openjdk-11.0.19.0.7-1.amzn2.0.1.x86_64   | [2023-07-12T11:41:19Z] You can try some of the following options:   | [2023-07-12T11:41:19Z] - changing the IDE settings.   | [2023-07-12T11:41:19Z] - changing the JAVA_HOME environment variable.   | [2023-07-12T11:41:19Z] - changing `org.gradle.java.home` in `gradle.properties`. ```

Breaking Change List:

  1. Move package from android manifest to build files
  2. Enable build config build feature for stories and app

AGP Upgrade Assistant List:

  1. Remove ignored configuration properties
  2. Migrate dsl properties from lint options to lint

Associated clients

You can reference the [Build] Upgrade Gradle to 8.1.1 and AGP to 8.0.2 PRs of the below associated clients for testing/verification purposes:


To test

  1. Verify that all the CI checks are successful.
  2. Test composite builds via the associated clients apps (see above).

Merge instructions

ParaskP7 commented 11 months ago

Awesome @oguzkocer , thanks for adding JDK17 support to this repo, updating the publish-to-s3 Gradle plugin, then reviewing and tentatively approving the changes, pending some extra testing! 🙇 ❤️ 🚀

FYI: I went ahead, marked this PR as Ready for review and removed the [PR] Not Ready for Merge label. The last thing for us to do is to coordinate the merge wit with all the other library and client PRs, merging this PR only when every other such PR is ready to be merged as well.