Skip to content

Commit

Permalink
Upgrade Hilt Gradle Plugin min AGP version to 8.1
Browse files Browse the repository at this point in the history
This change upgrades the required AGP in the Hilt Gradle Plugin and in turn cleans up the code no longer relevant due to the upgrade. [As of September 2024 the target SDK for apps in the play store is 34](https://developer.android.com/google/play/requirements/target-sdk) and the [minimum AGP that supports target SDK 34 is 8.1.1](https://developer.android.com/build/releases/gradle-plugin#api-level-support) hence why such version chosen.

* Remove the AGP abstraction an implementations from the plugin, we can now use Variant Component and ASM Transform APIs directly.
* AGP 8.1 requires Gradle 8.0 which in turns requires JDK 17, used jvmToolchain API where possible.
* AGP 8.1 requires minimum Android build tools of 33.0.1.
* AGP 8.1 requires Android projects to have their 'namespace' set.
* Update GitHub CI test matrix, removing older AGP values.

RELNOTES=Upgrade Hilt Gradle Plugin min AGP version to 8.1
PiperOrigin-RevId: 681507589
  • Loading branch information
danysantiago authored and Dagger Team committed Oct 2, 2024
1 parent 38a3c11 commit 18d2b26
Show file tree
Hide file tree
Showing 76 changed files with 515 additions and 1,243 deletions.
4 changes: 1 addition & 3 deletions .github/actions/artifact-android-local-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ inputs:
required: true
type: choice
options:
- '7.0.0'
- '7.1.2'
- '8.1.0'
- '8.1.1'
jdk:
description: 'The version of JDK to test with.'
required: true
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
env:
USE_JAVA_DISTRIBUTION: 'zulu'
USE_JAVA_VERSION: '11'
# This is required by AGP 8.3+.
# This is required by Gradle 8.0+.
USE_JAVA_VERSION_FOR_PLUGIN: '17'
# The default Maven 3.9.0 has a regression so we manually install 3.8.7.
# https://issues.apache.org/jira/browse/MNG-7679
Expand Down Expand Up @@ -68,11 +68,7 @@ jobs:
strategy:
matrix:
include:
- agp: '7.0.0'
jdk: '11'
- agp: '7.1.2'
jdk: '11'
- agp: '8.1.0'
- agp: '8.1.1'
jdk: '17'
steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
env:
USE_JAVA_DISTRIBUTION: 'zulu'
USE_JAVA_VERSION: '11'
# This is required by AGP 8.3+.
# This is required by Gradle 8.0+.
USE_JAVA_VERSION_FOR_PLUGIN: '17'
DAGGER_RELEASE_VERSION: "${{ github.event.inputs.dagger_release_version }}"
# The default Maven 3.9.0 has a regression so we manually install 3.8.7.
Expand Down Expand Up @@ -70,11 +70,7 @@ jobs:
strategy:
matrix:
include:
- agp: '7.0.0'
jdk: '11'
- agp: '7.1.2'
jdk: '11'
- agp: '8.1.0'
- agp: '8.1.1'
jdk: '17'
steps:
- uses: actions/checkout@v3
Expand Down
15 changes: 0 additions & 15 deletions java/dagger/hilt/android/plugin/agp-wrapper-7-0/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions java/dagger/hilt/android/plugin/agp-wrapper-7-1/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions java/dagger/hilt/android/plugin/agp-wrapper-7-2/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions java/dagger/hilt/android/plugin/agp-wrapper-impl/build.gradle

This file was deleted.

Loading

0 comments on commit 18d2b26

Please sign in to comment.