build: migrate build.gradle to Kotlin DSL#20989
Draft
david-allison wants to merge 6 commits intoankidroid:mainfrom
Draft
build: migrate build.gradle to Kotlin DSL#20989david-allison wants to merge 6 commits intoankidroid:mainfrom
david-allison wants to merge 6 commits intoankidroid:mainfrom
Conversation
Fixes a bug running `lint` after converting build.gradle to the Kotlin DSL AGP 9.0.1 Kotlin 2.3.21 lint 32.2 apply(from = "*.gradle.kts") to an Android build.gradle.kts module causes lint's K2 build-script analyzer to crash, even on an empty script Message: \\\`findFirCompiledSymbol\\\` only works on compiled declarations, but the given declaration is not compiled. Assisted-by: Claude Opus 4.7 - diagnostics
This is prep for converting the project to .kts This commit ensures that `git blame` is maintained Issue 20910
`resolutionStrategy` was moved out of `dependencies`: `DependencyHandlerScope` doesn't expose configurations Part of issue 20910 - moving the project to Kotlin DSL Assisted-by: Claude Opus 4.7 - all - asked for a 1:1 conversion
General IDE suggestions/deprecations ExperimentalCoroutinesApi: not needed. The opt-in is applied to all but a few modules in Anki-Android/build.gradle.kts
applicationVariants are not yet well handled Issue 20988
Based on `ankidroid.android.library` Related to issue 20775 Assisted-by: Claude Opus 4.7
5 tasks
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.
Note
Assisted-by: Claude Opus 4.7
Purpose / Description
This is the big one!
Now we can migrate all dependencies to
/gradle.ktswithout worry, and apply the convention plugin globallybuildSrcDue to the migration, a number of lint issues arose, which were fixed.
The TODO to create
ankidroid.android.appwas completed, in the style ofankidroid.android.libraryFixes
.gradleto.gradle.kts(Kotlin DSL) for build scripts/logic #20910android.newDsl#20988How Has This Been Tested?
./gradlew jacocoUnitTestReportgawk (5.4.0)which breaksrelease.sh, investigating this, but the change is done.Learning (optional, can help others)
gradle.ktsfile in a modulegradle.ktsfile triggered a bug with a nasty stack traceDetails
Checklist