Skip to content

Add AGP 9 and Gradle 9 configuration cache compatibility#84

Open
jawnpaul wants to merge 3 commits into
hyperdevs-team:masterfrom
jawnpaul:master
Open

Add AGP 9 and Gradle 9 configuration cache compatibility#84
jawnpaul wants to merge 3 commits into
hyperdevs-team:masterfrom
jawnpaul:master

Conversation

@jawnpaul
Copy link
Copy Markdown

Github issue

Resolves #82

PR's key points

  • Add AGP 9 compatibility by migrating to public DSL types
  • Fix Gradle configuration cache incompatibility in ImportPoEditorStringsTask: replace defaultResPath.getOrElse(getResourceDirectory(project, …)) with defaultResPath.get(), eliminating an illegal Task.project access at execution time

How to review this PR?

  • Check ImportPoEditorStringsTask.kt — the resDirPath assignment in @TaskAction now calls .get() directly since defaultResPath always carries a value set at configuration time; the getResourceDirectory fallback was dead code that caused the violation
  • Check AGP 9 migration changes for use of public DSL types replacing previously deprecated/removed internal ones
  • Run ./gradlew build to confirm compilation and tests pass
  • Optionally run importPoEditorStrings with --configuration-cache enabled to confirm no Task.project invocation error

Definition of Done

  • Changes summary added to CHANGELOG.md
  • Documentation added to README.md (if a new feature is added)
  • Tests added (if new code is added)
  • There is no outcommented or debug code left

jawnpaul added 3 commits May 28, 2026 17:34
Replace the internal `BaseAppModuleExtension` (removed in AGP 9) with the stable public `ApplicationExtension`, migrate `LibraryExtension` to the `com.android.build.api.dsl` package, and replace the removed `applicationVariants`/`libraryVariants` APIs with direct reads of `productFlavors` and `buildTypes`. Bump the compileOnly AGP dependency to 9.0.0 and update the minimum requirement in the README accordingly.
…with `defaultResPath.get()`. The fallback was dead code — defaultResPath always carries a value set at configuration time — but Kotlin's eager argument evaluation caused `Task.project` to be accessed at execution time, which Gradle's configuration cache forbids.
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.

Android Gradle Plugin 9 support for the POEditor plugin

1 participant