Fix #13282 Upgraded AGP version from 8.13.2 to 9.0.1#20410
Closed
aadityarshah wants to merge 2 commits intoankidroid:mainfrom
Closed
Fix #13282 Upgraded AGP version from 8.13.2 to 9.0.1#20410aadityarshah wants to merge 2 commits intoankidroid:mainfrom
aadityarshah wants to merge 2 commits intoankidroid:mainfrom
Conversation
This commit upgrades the AGP version from 8.13.2 to 9.0.1 with required changes in gradle files according to the official release notes provided at https://developer.android.com/build/releases/agp-9-0-0-release-notes.
Contributor
|
For android studio warnings, you can take 1 or 2 small warnings in any of the code files and fix those. I believe version upgrades like this are taken care of automatically, so you would have a guaranteed merge doing what I suggested! |
Author
|
Thank you for your guidance sir! I will revert back the AGP upgrade and work on fixing android studio warnings. |
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.
Purpose / Description
The codebase was on AGP version 8.13.2 and on opening it on Android Studio, AGP Assistant recommended to upgrade it to 9.0.1 (latest version) which is what is the purpose of this PR.
To ensure compatibility with third-party plugins like Slack Keeper,
android.builtInKotlin=falseandandroid.newDsl=falsehave been used ingradle.properties.Fixes
Fixes #13282 (Fix Android Studio Warnings)
Approach
build.gradle.kts (AnkiDroid)hadCommonExtension<*, *, *, *, *, *>but the parameterization ofCommonExtensionhas been removed in AGP 9.0 hence, they were removed.api/build.gradle.kts, thegetDefaultProguardFile("proguard-android.txt")was modified togetDefaultProguardFile("proguard-android-optimize.txt")as suggested on running./gradlew assembleDebugcommand'android.generateSyncIssueWhenLibraryConstraintsAreEnabled'as it was said to improve projects import performance for very large projects, the line'android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false'was added togradle.propertiesproperty (value)toproperty = nameas required inAnkiDroid/build.gradle, e.g.testCoverageEnabled truetotestCoverageEnabled = truebuild.gradle.kts (AnkiDroid)since the values forktlintVersion and minSDKwere always going to be non-null.jacoco.gradleby usingtasks.matching {it.name == 'testPlayDebugUnitTest'}.configureEach { task -> ...}ensuring the configuration is applied only when task is created.How Has This Been Tested?
./gradlew assembleDebugwas ran using OpenJDK 24 version on Windows 11 and since it executed successfully, it was concluded that the changes have worked successfully.:AnkiDroidmodule to an emulator which ran successfullyLearning (optional, can help others)
AGP 9.0 uses new DSL interfaces which have been implemented and some old DSL types are not compatible now such as
BaseExtension.Checklist
Please, go through these checks before submitting the PR.