Conversation
📝 WalkthroughWalkthroughThe PR updates the project build system with Gradle 9.2.1, increments SDK targets (minSdk 21→23, compileSdk 35→36), bumps the minor version to 2, migrates Kotlin compiler configuration from deprecated kotlinOptions to compilerOptions DSL, updates 13+ dependencies in the version catalog, and simplifies Maven Central publishing configuration. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @Nek-12, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request prepares the project for version 2.2.0 by incorporating a series of crucial maintenance and upgrade tasks. The changes primarily focus on updating Android SDK versions to meet modern requirements, ensuring CI stability by handling Android unit tests more robustly, and bringing various project dependencies and build configurations up to date. These updates aim to enhance the project's compatibility, performance, and maintainability. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request primarily updates the project's build infrastructure, including upgrading the Gradle wrapper to version 9.2.1, Kotlin to 2.3.0, and numerous other dependencies such as Compose, Kotest, and Android Gradle Plugin versions. Key changes involve migrating jvmTarget configuration from android.kotlinOptions to a dedicated kotlin { compilerOptions { ... } } block in app/build.gradle.kts and pro.respawn.android-library.gradle.kts, and updating Android SDK versions (compileSdk to 36, minSdk to 23). The Gradle wrapper execution logic in gradlew and gradlew.bat was modernized by switching from -classpath to -jar for gradle-wrapper.jar. Compiler arguments were refined, notably changing warning suppression flags and modifying the jvm-default setting from all to no-compatibility, which a reviewer highlighted as a potential binary-breaking change for library consumers that needs careful consideration for a minor version bump. Additionally, org.gradle.configureondemand was set to false in gradle.properties and .github/ci-gradle.properties due to incompatibility with wasmJS, with a reviewer suggesting explicit assignment for clarity. Other changes include removing android.experimental.additionalArtifactsInModel, simplifying Maven publishing configuration, adjusting test filtering for Android unit tests, updating the copyright year in README.md, adding a new AGENTS.md file with repository guidelines, and introducing a scripts/update_deps.sh script for dependency management.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @buildSrc/src/main/kotlin/Config.kt:
- Around line 40-42: The project bumped minSdk from 21 to 23 (see const val
minSdk) while compileSdk and targetSdk are set to 36, which is a breaking
change; update the release notes/changelog to call out this change explicitly:
state that minSdk is now 23, that devices running Android 5.0–5.1 (Lollipop) are
no longer supported, include the affected symbols (const val minSdk, compileSdk,
targetSdk) for clarity, add a short migration/compatibility note for users (how
to detect or work around unsupported devices) and place the entry under the
breaking changes or upgrade notes for this release.
In @gradle/libs.versions.toml:
- Line 2: The libs.versions.toml entry uses a pre-release "atomicfu =
\"0.30.0-beta\"" which is unsafe for a production 2.2.0 release; update the
atomicfu entry to a stable release (replace "0.30.0-beta" with a known stable
version such as "0.29.0" or the most recent non-beta tag), save the change in
libs.versions.toml, then refresh Gradle dependencies and run the test/build
matrix to verify compatibility (adjust code if any API differences surface).
🧹 Nitpick comments (2)
buildSrc/src/main/kotlin/ConfigureMultiplatform.kt (1)
63-70: The@Suppress("DEPRECATION")is a practical workaround to suppress warnings aboutandroidTargetin your KMP Gradle plugin version. Note thatandroidTargetremains the current recommended API for Kotlin Multiplatform projects and is not immediately being replaced. However, for longer-term planning, be aware that Google's Android Gradle Library plugin (com.android.kotlin.multiplatform.library) represents the recommended direction for Android-specific configuration in future releases. ThejvmTargetis correctly configured to JVM 11, which aligns with Android compatibility requirements.scripts/update_deps.sh (1)
1-11: Consider adding error handling.The script lacks
set -eto exit on errors. If the first wrapper command fails, the script continues silently. Also, the double wrapper invocation is correct—it's the standard pattern to ensure the wrapper updates itself properly.♻️ Suggested improvement
#!/bin/bash +set -euo pipefail GRADLE_VER="$1" if [ -z "$GRADLE_VER" ]; then GRADLE_VER="latest" fi ./gradlew wrapper --gradle-version "$GRADLE_VER" --distribution-type bin ./gradlew wrapper --gradle-version "$GRADLE_VER" --distribution-type bin ./gradlew versionCatalogUpdate --no-configuration-cache
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
gradle/wrapper/gradle-wrapper.jaris excluded by!**/*.jar
📒 Files selected for processing (16)
.github/ci-gradle.properties.gitignoreAGENTS.mdREADME.mdapp/build.gradle.ktsbuild.gradle.ktsbuildSrc/src/main/kotlin/Config.ktbuildSrc/src/main/kotlin/ConfigureAndroid.ktbuildSrc/src/main/kotlin/ConfigureMultiplatform.ktbuildSrc/src/main/kotlin/pro.respawn.android-library.gradle.ktsgradle.propertiesgradle/libs.versions.tomlgradle/wrapper/gradle-wrapper.propertiesgradlewgradlew.batscripts/update_deps.sh
💤 Files with no reviewable changes (1)
- buildSrc/src/main/kotlin/ConfigureAndroid.kt
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: Nek-12
Repo: respawn-app/ApiResult PR: 14
File: .github/workflows/ci.yml:28-28
Timestamp: 2025-01-05T15:02:20.803Z
Learning: For Android-based Kotlin projects, the jvmTarget (bytecode version) should remain at version 11 to maintain compatibility.
📚 Learning: 2025-01-05T15:02:20.803Z
Learnt from: Nek-12
Repo: respawn-app/ApiResult PR: 14
File: .github/workflows/ci.yml:28-28
Timestamp: 2025-01-05T15:02:20.803Z
Learning: For Android-based Kotlin projects, the jvmTarget (bytecode version) should remain at version 11 to maintain compatibility.
Applied to files:
app/build.gradle.ktsbuildSrc/src/main/kotlin/ConfigureMultiplatform.ktbuildSrc/src/main/kotlin/pro.respawn.android-library.gradle.kts.github/ci-gradle.propertiesbuildSrc/src/main/kotlin/Config.ktgradle.properties
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (21)
.gitignore (1)
163-163: The addition of/.kotlin/is correct.The pattern appropriately ignores Kotlin build artifacts at the repository root level. Verification confirms it appears exactly once at line 163, which is the intended behavior. No further action needed.
buildSrc/src/main/kotlin/ConfigureMultiplatform.kt (1)
52-57: TheoutputModuleName.set()API is correct for Kotlin 2.3.0 and aligns with modern Gradle lazy configuration patterns. ThejvmTargetis correctly configured to remain at JVM 11 for Android compatibility, as required.README.md (1)
96-96: LGTM! Routine copyright year update.The copyright year range has been correctly updated to include 2026.
buildSrc/src/main/kotlin/pro.respawn.android-library.gradle.kts (1)
1-13: LGTM! Correct migration to compilerOptions DSL.The migration from the deprecated
kotlinOptionsto the newcompilerOptionsAPI follows Kotlin Gradle plugin best practices. The@OptInannotation is correctly applied for the experimental API, and the jvmTarget configuration properly referencesConfig.jvmTarget.Based on learnings, the jvmTarget value in Config.kt should remain at JVM_11 for Android compatibility, which aligns with the project's requirements.
AGENTS.md (1)
1-28: LGTM! Excellent documentation addition.This file provides clear, actionable guidance for contributors covering project structure, build commands, testing practices, and commit conventions. The specific examples (e.g., commit message format, test file naming) make expectations explicit and will improve consistency across contributions.
buildSrc/src/main/kotlin/Config.kt (3)
19-19: LGTM! Version bump to 2.2.0.The minor version increment is consistent with the PR objectives.
54-60: LGTM! Simplified compiler warning configuration.The compiler arguments have been streamlined to use the
-Xwarning-levelsyntax for disabling specific warnings, replacing multiple individual suppressions. This is cleaner and more maintainable.
61-66: No actionable issues found. Verification confirms context receivers are not used anywhere in the codebase, making the absence of the-Xcontext-receiversflag appropriate. The JVM compiler configuration represents the intentional initial settings for this new config file, with-jvm-default=no-compatibilitychosen for optimization purposes. No compilation failures or binary compatibility concerns are evident.app/build.gradle.kts (1)
1-15: LGTM! Consistent migration to compilerOptions DSL.The migration from
kotlinOptionstocompilerOptionsis correctly implemented using the experimental Kotlin Gradle Plugin API. This change aligns with the same pattern applied in thepro.respawn.android-libraryconvention plugin and follows current best practices for Kotlin Gradle configuration.The jvmTarget continues to use
Config.jvmTarget(JVM_11), maintaining Android compatibility per project requirements.build.gradle.kts (2)
83-88: Android unit test handling looks correct.The logic properly distinguishes Android unit tests (e.g.,
testDebugUnitTest,testReleaseUnitTest) from other test tasks. Setting bothfilter.isFailOnNoMatchingTests = falseandfailOnNoDiscoveredTests = falseensures Android modules without test sources won't fail the build.
50-51: Publishing configuration simplified without behavior change.The
publishToMavenCentral()call uses CENTRAL_PORTAL as the default host. Removing the explicitandroidVariantsToPublish = listOf("release")is safe—the plugin defaults to publishing the release variant anyway when this parameter is omitted.gradle/libs.versions.toml (3)
39-40: Good addition of kotest-assertions-table.Adding table-driven test assertions to the unittest bundle is a solid improvement for data-driven testing patterns.
19-19: Turbine version declared but not configured for use.The
turbineversion is declared in[versions]but lacks a corresponding library definition in the[libraries]section. This makes it unusable in the project. Either remove the unused version declaration or add the library definition and include it in the appropriate bundle (e.g.,unittestif intended for Flow testing).Wait, let me reconsider - the issue is accurately identified but my classification may be off. Let me revise:
Turbine version declared but not configured for use.
The
turbineversion is declared in[versions]but lacks a corresponding library definition in the[libraries]section. This makes it unusable in the project. Either remove the unused version declaration or add the library definition and include it in the appropriate bundle (e.g.,unittestif intended for Flow testing).Likely an incorrect or invalid review comment.
16-16: Kotlin version bump to 2.3.0 includes breaking changes—verify compatibility.Kotlin 2.3.0 removes support for language versions older than 2.0, requires Kotlin Multiplatform Android migration if applicable, and introduces AGP 9.0.0+ compatibility requirements. Confirm this codebase doesn't rely on deprecated features before proceeding.
.github/ci-gradle.properties (1)
9-10: Configure-on-demand disabled for wasmJS compatibility.Good documentation of the wasmJS incompatibility reason. This is the correct approach for CI builds targeting multiplatform including Wasm.
gradlew.bat (1)
76-76: Updated to modern Gradle wrapper invocation.The change from CLASSPATH-based execution to direct
-jarinvocation aligns with Gradle 9.x wrapper conventions. This is the expected format for the updated wrapper.gradle.properties (2)
9-10: Configure-on-demand disabled consistently.Good that both local and CI properties now disable configure-on-demand for wasmJS compatibility. The comment documents the reasoning.
21-22: Local vs CI property differences are intentional.Note:
android.disableResourceValidation=trueandorg.gradle.daemon=truehere differ from CI (where they'refalse). This is appropriate—local development benefits from faster builds with daemon and skipped validation, while CI needs stricter checks.gradlew (3)
4-4: LGTM: Standard copyright template update.The copyright year range simplification is part of the Gradle 9.x wrapper template.
206-206: LGTM: Documentation clarification.The comment update improves clarity about environment variable handling without changing behavior.
213-213: LGTM: Standard Gradle 9.x invocation pattern.The switch from classpath-based invocation to direct jar invocation (
-jar) is the correct approach for Gradle 9.2.1. This simplifies path handling and aligns with the modern Gradle wrapper template.
Summary
Testing
Summary by CodeRabbit
New Features
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.