Skip to content

[EPIC] Gradle 9.0 migration#152

Merged
alex-amenos merged 38 commits intomainfrom
epic/migrate-to-agp-9-0
Mar 17, 2026
Merged

[EPIC] Gradle 9.0 migration#152
alex-amenos merged 38 commits intomainfrom
epic/migrate-to-agp-9-0

Conversation

@alex-amenos
Copy link
Owner

@alex-amenos alex-amenos commented Mar 8, 2026

⚡️ Proposed Changes

  • Migrate to Gradle 9

ℹ️ Additional Info

  • Add any additional useful context or info

🔗 Related Links

✅ Checklist

  • Unit Tests
  • Integration Tests
  • Compose Tests
  • Screenshot Tests
  • Updated string
  • Manually tested

📷 Screenshots

Copilot AI and others added 10 commits March 4, 2026 20:00
Co-authored-by: alex-amenos <11457623+alex-amenos@users.noreply.github.com>
…kover version

Co-authored-by: alex-amenos <11457623+alex-amenos@users.noreply.github.com>
…ponents.onVariants

Co-authored-by: alex-amenos <11457623+alex-amenos@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 8, 2026 21:38
@alex-amenos alex-amenos changed the title [EPIC [EPIC] AGP 9.0 migration Mar 8, 2026
@alex-amenos alex-amenos self-assigned this Mar 8, 2026
@alex-amenos alex-amenos added the WIP Work In Progres label Mar 8, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project’s Android/Gradle build setup (Gradle/AGP/Kotlin + plugin catalog), migrates coverage aggregation to Kover 0.9.x, and removes deprecated annotation-processing/parcelling pieces to align with the newer toolchain.

Changes:

  • Upgrade build tooling (Gradle 9.1.0, AGP 9.0.1) and refresh plugin/version catalog entries.
  • Migrate Kover configuration to 0.9.x multi-module aggregation and update CI to run a Kover report task.
  • Remove Lifecycle kapt compiler usage and drop Parcelable/@Parcelize from Post.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
shared/core/build.gradle Removes lifecycle compiler kapt dependency from shared core.
gradle/wrapper/gradle-wrapper.properties Bumps Gradle wrapper to 9.1.0.
gradle/libs.versions.toml Updates AGP/JUnit/Kover/etc versions; modernizes plugin declarations; removes lifecycle-compiler and old kover library entry.
gradle.properties Adds AGP property related to KSP/Kotlin source sets warning.
feature/posts/src/test/.../PostsViewModelBehaviorSpec.kt Adjusts test setup around dismissing errors and repository stubbing.
feature/posts/src/main/.../Post.kt Removes Parcelable implementation and Parcelize annotations.
buildSystem/gradle/kover-merge.gradle Replaces old merged config with Kover 0.9.x aggregation and filtering.
buildSystem/gradle/common-app-base.gradle Updates AGP DSL + lint/packaging config; updates APK naming via androidComponents.
buildSystem/gradle/common-android-feature.gradle Removes lifecycle compiler kapt dependency from feature base.
buildSystem/gradle/common-android-base.gradle Updates AGP DSL + lint/packaging config; changes junit/kover plugin application.
buildSrc/src/main/java/AppConfig.kt Removes build tools version constant.
build.gradle Removes kover classpath usage; comments out android-reporting; applies kover merge script.
.github/workflows/android_ci.yml Switches CI “Debug Unit tests” task from Roborazzi verify to Kover HTML report.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@@ -1,15 +1,12 @@
apply plugin: 'com.android.application'
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

common-app-base.gradle no longer applies the Kotlin Android plugin. Since app/build.gradle only applies this shared script and the app module contains Kotlin sources (e.g., app/src/main/.../JetpackApp.kt), the module will fail to compile unless the Kotlin plugin is applied elsewhere. Re-add applying org.jetbrains.kotlin.android here (or migrate modules to the plugins {} DSL consistently).

Suggested change
apply plugin: 'com.android.application'
apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.android'

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (3)

feature/posts/src/test/kotlin/com/alxnophis/jetpack/posts/ui/viewmodel/PostsViewModelBehaviorSpec.kt:44

  • The Kotest BehaviorSpec DSL blocks (Given/When/Then) are being declared inside runTest { ... }. runTest executes immediately during spec construction, so these Then blocks may never be registered as tests (or tests may run during init). Move runTest inside the Then { ... } body (or make the Kotest test itself suspend) and keep the DSL declarations at spec-definition time.
                runTest {
                    viewModel.handleEvent(PostsEvent.OnUpdatePostsRequested)

                    Then("uiState should reflect success with loaded posts") {

                        viewModel.uiState.test {
                            awaitItem() shouldBe PostsUiState.initialState.copy(status = PostsStatus.Success, posts = postList.toImmutableList())
                            expectNoEvents()
                        }
                    }
                }

feature/posts/src/test/kotlin/com/alxnophis/jetpack/posts/ui/viewmodel/PostsViewModelBehaviorSpec.kt:86

  • Same issue here: wrapping the Then { ... } declaration in runTest { ... } means the Kotest DSL is executed at runtime instead of during spec construction, so the test may not be registered/executed correctly. Define the Then block directly under When, and call runTest (or other coroutine test helpers) inside the Then body.
                    runTest {
                        viewModel.handleEvent(PostsEvent.OnUpdatePostsRequested)

                        Then("uiState should reflect error with appropriate error type") {
                            viewModel.uiState.test {
                                awaitItem() shouldBe
                                    PostsUiState.initialState.copy(
                                        status = PostsStatus.Error,
                                        error = testCase.uiError,
                                    )
                                expectNoEvents()
                            }
                        }
                    }

feature/posts/src/test/kotlin/com/alxnophis/jetpack/posts/ui/viewmodel/PostsViewModelBehaviorSpec.kt:112

  • Same DSL/timing problem: this Then { ... } is declared inside runTest, so it may not be registered as a Kotest test. Keep the Then declaration at the BehaviorSpec level and use runTest inside the Then block to drive the coroutine scheduling.
                runTest {
                    viewModel.handleEvent(PostsEvent.DismissErrorRequested)

                    Then("uiState should clear the error and return to success state") {
                        viewModel.uiState.test {
                            awaitItem() shouldBe
                                initialStateWithError.copy(
                                    status = PostsStatus.Success,
                                    error = null,
                                )
                            expectNoEvents()
                        }
                    }
                }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Alex added 4 commits March 16, 2026 08:52
…p-9-0

# Conflicts:
#	feature/posts/src/test/kotlin/com/alxnophis/jetpack/posts/ui/viewmodel/PostsViewModelBehaviorSpec.kt
alex-amenos and others added 16 commits March 16, 2026 22:37
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@alex-amenos alex-amenos changed the title [EPIC] AGP 9.0 migration [EPIC] Gradle 9.0 migration Mar 17, 2026
Alex added 2 commits March 17, 2026 23:14
…9.0 migration and remove deprecated settings
….versions.toml and remove unused line in gradle.properties
@alex-amenos alex-amenos removed the WIP Work In Progres label Mar 17, 2026
@alex-amenos alex-amenos merged commit 2ef76f8 into main Mar 17, 2026
1 check passed
@alex-amenos alex-amenos deleted the epic/migrate-to-agp-9-0 branch March 17, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants