Skip to content

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Nov 27, 2025

Update HiltGradlePlugin to AGP 9.

This required a number of changes:

  • Update Gradle 8.14.3 -> 9.2.0
  • Update shadow plugin from com.github.johnrengelman.shadow:8.1.1 to 'com.gradleup.shadow:9.2.2' (old artifact doesn't support Gradle 9).
  • Update HiltGradlePlugin to 9.0.0-beta02:
    • Migrate BaseExtension to AndroidComponentsExtension
    • Migrate BaseVariant to Component
    • Migrate variant.javaCompileOutput.classpath to variant.compileClasspath
    • Migrate variant.javaCompileOutput.destinationDirectory to variant.artifacts.use(HiltCopyTask).toGet()
    • Migrate variant.javaCompileOutput.options.bootstrapClasspath with androidExtension.sdkComponents.bootClasspath
    • Migrate variant.javaCompileOutput.options.compilerArgumentProviders with variant.javaCompilation.annotationProcessor.argumentProviders
    • project.buildDir = ... to project.layout.buildDirectory.set(...)
  • Update HiltGradlePlugin tests to use AGP 9.0.0-beta02:
    • Migrate to builtin kotlin
      • remove 'kotlin-android'
      • replace 'kotlin-kapt' with 'legacy-kapt'
    • Migrate javatests/artifacts/hilt-android/simple/app/build.gradle to kts and replace GradleVersion with custom AgpVersion.
      The GradleVersion does not work with APG versions like 9.0.0-beta02, so I had to do this with custom parsing.
    • remove android.kotlinOptions (removed in AGP 9)

RELNOTES=N/A

@copybara-service copybara-service bot force-pushed the test_837566667 branch 5 times, most recently from f42ef5c to 1ebf530 Compare November 30, 2025 21:59
This required a number of changes:

   * Update Gradle 8.14.3 -> 9.2.0
   * Update shadow plugin from `com.github.johnrengelman.shadow:8.1.1` to 'com.gradleup.shadow:9.2.2' (old artifact doesn't support Gradle 9).
   * Update HiltGradlePlugin to 9.0.0-beta02:
     * Migrate `BaseExtension` to `AndroidComponentsExtension`
     * Migrate `BaseVariant` to `Component`
     * Migrate `variant.javaCompileOutput.classpath` to `variant.compileClasspath`
     * Migrate `variant.javaCompileOutput.destinationDirectory` to `variant.artifacts.use(HiltCopyTask).toGet()`
     * Migrate `variant.javaCompileOutput.options.bootstrapClasspath` with `androidExtension.sdkComponents.bootClasspath`
     * Migrate `variant.javaCompileOutput.options.compilerArgumentProviders` with `variant.javaCompilation.annotationProcessor.argumentProviders`
     * `project.buildDir = ...` to `project.layout.buildDirectory.set(...)`
   * Update HiltGradlePlugin tests to use AGP 9.0.0-beta02:
     * Migrate to builtin kotlin
       * remove 'kotlin-android'
       * replace 'kotlin-kapt' with 'legacy-kapt'
     * Migrate javatests/artifacts/hilt-android/simple/app/build.gradle to kts and replace GradleVersion with custom AgpVersion.
       The GradleVersion does not work with APG versions like 9.0.0-beta02, so I had to do this with custom parsing.
     * remove `android.kotlinOptions` (removed in AGP 9)

RELNOTES=N/A
PiperOrigin-RevId: 837566667
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant