update AGP to 9.3.1 - #547
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the project's build configuration, including upgrading Gradle, the Android Gradle Plugin (AGP), and Hilt, while transitioning from Kotlin context receivers to context parameters. It also removes the kotlin-android plugin across modules and replaces kotlin-kapt with android-legacy-kapt. Feedback highlights several critical issues: the removal of the essential kotlin-android plugin will break Kotlin compilation, and the specified versions for Gradle (9.6.0), AGP (9.3.1), and the com.android.legacy-kapt plugin do not exist, which will cause build and dependency resolution failures. Additionally, removing consumerProguardFiles from the camera data module risks runtime crashes in obfuscated builds. Finally, there are formatting and indentation issues in CameraSession.kt and several build.gradle.kts files that violate Kotlin style guidelines.
07f719f to
07ae446
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the Android Gradle Plugin to version 9.3.1, Gradle wrapper to 9.6.1, and Hilt to 2.59.2, alongside migrating modules to use the legacy KAPT plugin and modernizing Kotlin compiler options. It also removes obsolete testing workarounds. The review feedback highlights minor formatting and indentation inconsistencies in the kotlin configuration blocks across several build.gradle.kts files, which should be cleaned up to adhere to the Kotlin style guide.
6d828d9 to
c5db5b5
Compare
Upgrades the project's build system: - Upgraded Android Gradle Plugin to 9.3.1 and Gradle Wrapper to 9.6.1. - Migrated all modules from 'kotlin.android' to AGP's built-in Kotlin support. - Replaced 'kotlin.kapt' with 'legacy-kapt' for compatibility with built-in Kotlin. - Upgraded Hilt to 2.59.2 for AGP 9 compatibility. - Updated compiler flags to pass -Xcontext-receivers under the new built-in Kotlin configuration block in 11 modules. - Updated README to reflect Android Studio Quail / AGP 9 requirements. - Enabled parallel Gradle sync in gradle.properties.
Deletes the unused and duplicated test helper classes in :ui:components:capture. Gradle 9 fails the build if a module contains test sources but no actual @test classes to execute, which was the case here since it only contained test utilities.
c5db5b5 to
178f266
Compare
This PR upgrades the project's build infrastructure to support Android Gradle Plugin (AGP) 9.3.1 and Gradle 9.6.1. It preserves the existing context receivers syntax, migrating only the compiler configuration.
1. Build & Dependency Updates
9.3.1, Gradle Wrapper to9.6.1, and Hilt to2.59.2.kotlin.androidplugin to AGP's built-in Kotlin support.* Kapt Migration: Replaced
kotlin.kaptwithlegacy-kaptacross 22 submodules (required for Hilt compatibility with built-in Kotlin before migrating to KSP).* Configs: Enabled parallel sync in
gradle.propertiesand updatedREADME.mdfor Android Studio Quail requirements.2. Compiler Flag Relocation
-Xcontext-receiversflag from the deprecatedkotlinOptionsblock to the new top-levelkotlin.compilerOptionsblock across 11 modules to keep context receivers active under built-in Kotlin. (see PR Replace Context Receivers with Context Parameters #548 for full conversion to current Context Parameters)3. Gradle 9 / AGP 9 Compatibility Fixes
include(":data:model")fromsettings.gradle.ktsas Gradle 9 strictly forbids including project directories that do not exist or lack build files.data/camera/consumer-rules.profile because AGP 9 requires all declared consumer ProGuard files to exist on disk.