You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following #710 this fixes the use of AGP+9 and also when using android.builtInKotlin=false in gradle.properties (while android.builtInKotlin=false is discouraged to use in AGP9 it can still be false in this version until the migration is complete)
Apply kotlin-android whenever built-in Kotlin is not active
Thanks @EdwynZN — great catch, and your guard logic is the right one: AGP 9.0 enables built-in Kotlin by default, so treating the property as active unless explicitly false matches AGP's real semantics (a == 'true' check would wrongly apply KGP when the property is absent).
I pushed a small follow-up to your branch (comment only — it still said builtInKotlin=false means "no Kotlin plugin compiles at all", which this fix changes): 635ea4a.
Verified locally against the exact environment from #722 (AGP 9.0.1, KGP 2.3.20, android.newDsl=false, android.builtInKotlin=false): pre-fix evaluation fails with Could not find method kotlin() at line 60, post-fix BUILD SUCCESSFUL with the full plugin compiled into the AAR (74 classes incl. WorkmanagerPlugin/BackgroundWorker). builtInKotlin=true mode and the AGP 8.11 path (50 unit tests) also green.
Can you confirm this fixes the build for you? Also approved the CI runs for this PR.
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
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.
Following #710 this fixes the use of AGP+9 and also when using
android.builtInKotlin=falseingradle.properties(while android.builtInKotlin=false is discouraged to use in AGP9 it can still be false in this version until the migration is complete)