Add AGP 9 and Gradle 9 configuration cache compatibility#84
Open
jawnpaul wants to merge 3 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Github issue
Resolves #82
PR's key points
ImportPoEditorStringsTask: replacedefaultResPath.getOrElse(getResourceDirectory(project, …))withdefaultResPath.get(), eliminating an illegalTask.projectaccess at execution timeHow to review this PR?
ImportPoEditorStringsTask.kt— theresDirPathassignment in@TaskActionnow calls.get()directly sincedefaultResPathalways carries a value set at configuration time; thegetResourceDirectoryfallback was dead code that caused the violation./gradlew buildto confirm compilation and tests passimportPoEditorStringswith--configuration-cacheenabled to confirm noTask.projectinvocation errorDefinition of Done