Skip to content

Conversation

@matejsemancik
Copy link
Member

@matejsemancik matejsemancik commented Nov 1, 2025

Summary by CodeRabbit

  • Chores

    • Updated multiple build dependencies to newer versions (Android Gradle Plugin, Kotlin, KSP, Koin, Ktor, Kermit, SKIE, Moko Resources)
    • Increased JVM metaspace for improved build performance
  • New Features

    • Annotation processor gains configurable options for Koin and component factory usage
    • Annotation processing now wired across all Android build types in several modules, improving build-variant coverage

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 1, 2025

Walkthrough

Adds a centralized ProjectSettings.Android.BuildTypes.all list aggregating Debug, Enterprise, and Release. Extends the annotations-processor convention plugin with three new extension properties (useKoin, useComponentFactory, androidBuildTypes), reverts the KOIN_CONFIG_CHECK argument when Koin is enabled, and introduces manual wiring for build-variant-specific KSP task ordering. Several shared module build scripts are updated to set androidBuildTypes = ProjectSettings.Android.BuildTypes.all. Dependency versions in the version catalog were bumped and Gradle JVM/metaspace options were adjusted (kotlin.daemon option extracted).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review the new BuildTypes.all property and its usage sites in shared module build files.
  • Inspect conventions-annotations-processor.gradle.kts changes: new extension properties, KOIN_CONFIG_CHECK change, and the manual KSP task wiring (task name computation and mustRunAfter logic).
  • Verify version catalog bumps (Kotlin, KSP, Koin, Ktor, etc.) for compatibility with project toolchain.
  • Check gradle.properties changes: metaspace sizing and the new kotlin.daemon.jvm.options separation.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions updating Kotlin to 2.2.10, but the actual changes show Kotlin was updated to 2.2.20, not 2.2.10. Additionally, the title oversimplifies the scope—multiple gradle properties, build type configurations, and KSP task wiring were added beyond just dependency updates. Update the PR title to accurately reflect the actual Kotlin version (2.2.20) and highlight the key configuration changes, such as 'Update Kotlin to 2.2.20, adjust KSP task wiring, and add build type configuration'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/bump-dependencies

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@matejsemancik matejsemancik added android Android-related issues kmp KMP-related issues labels Nov 1, 2025
This commit adds support for build variant-aware KSP (Kotlin Symbol Processing) tasks.

Key changes:
- Adds a mechanism to the `conventions-annotations-processor` to correctly wire KSP task dependencies for different Android build types (e.g., debug, release).
- Updates all relevant `build.gradle.kts` files to pass the build types to the convention plugin.
- Bumps the `ksp` version to `2.3.0`.
Comment on lines -22 to +36
arg("KOIN_CONFIG_CHECK", "true")
arg("KOIN_CONFIG_CHECK", "false")
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm disabling this for now because Koin annotations somehow refuses to detect dependencies with named qualifier from the same subproject.

@matejsemancik matejsemancik requested a review from Syntey November 2, 2025 16:11
@matejsemancik matejsemancik marked this pull request as ready for review November 2, 2025 16:11
@github-actions
Copy link

github-actions bot commented Nov 2, 2025

2 Warnings
⚠️ Feature or fix PR title should include JIRA-ID and short description.
⚠️ Feature or fix PR branch name should include JIRA-ID and short description.
2 Messages
📖 iosAppUITests: Executed 1 test, with 0 failures (0 expected) in 6.258 (6.258) seconds
📖 iosAppTests: Executed 1 test, with 0 failures (0 expected) in 0.001 (0.001) seconds

Generated by 🚫 Danger

@github-actions
Copy link

github-actions bot commented Nov 2, 2025

2 Warnings
⚠️ Feature or fix PR title should include JIRA-ID and short description.
⚠️ Feature or fix PR branch name should include JIRA-ID and short description.

Generated by 🚫 Danger

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5674555 and ee2d73a.

📒 Files selected for processing (8)
  • buildSrc/src/main/kotlin/app/futured/kmptemplate/gradle/configuration/ProjectSettings.kt (1 hunks)
  • convention-plugins/src/main/kotlin/conventions-annotations-processor.gradle.kts (4 hunks)
  • gradle.properties (1 hunks)
  • gradle/libs.versions.toml (3 hunks)
  • shared/app/build.gradle.kts (1 hunks)
  • shared/feature/build.gradle.kts (1 hunks)
  • shared/network/graphql/build.gradle.kts (1 hunks)
  • shared/persistence/build.gradle.kts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{kt,kts}

📄 CodeRabbit inference engine (CLAUDE.md)

Max line length: 140 characters

Files:

  • shared/feature/build.gradle.kts
  • shared/persistence/build.gradle.kts
  • buildSrc/src/main/kotlin/app/futured/kmptemplate/gradle/configuration/ProjectSettings.kt
  • shared/app/build.gradle.kts
  • shared/network/graphql/build.gradle.kts
  • convention-plugins/src/main/kotlin/conventions-annotations-processor.gradle.kts
**/*.kt

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.kt: Error handling: Use sealed NetworkError classes and model operations as results (Success/Failure)
Max 25 functions per class
Max 20 functions per file

Files:

  • buildSrc/src/main/kotlin/app/futured/kmptemplate/gradle/configuration/ProjectSettings.kt
🧠 Learnings (1)
📚 Learning: 2025-09-03T08:24:27.077Z
Learnt from: CR
Repo: futuredapp/kmp-futured-template PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-03T08:24:27.077Z
Learning: Applies to **/*.{android.kt,ios.kt} : Platform-specific code: Place implementations in files suffixed with .android.kt and .ios.kt

Applied to files:

  • shared/feature/build.gradle.kts
  • shared/persistence/build.gradle.kts
  • shared/app/build.gradle.kts
  • gradle/libs.versions.toml
  • shared/network/graphql/build.gradle.kts
  • convention-plugins/src/main/kotlin/conventions-annotations-processor.gradle.kts
🔇 Additional comments (9)
gradle.properties (1)

3-3: LGTM: Clean separation of Kotlin daemon JVM options.

The new kotlin.daemon.jvm.options property properly separates Kotlin-specific JVM settings, and the 1g metaspace allocation aligns with the updated Kotlin 2.2.10 toolchain.

shared/app/build.gradle.kts (1)

25-25: LGTM: Consistent build type configuration.

The addition of androidBuildTypes = ProjectSettings.Android.BuildTypes.all properly enables all Android build types (Debug, Enterprise, Release) for Koin annotation processing in this module, aligning with the new centralized build type configuration.

shared/persistence/build.gradle.kts (1)

15-15: LGTM: Consistent build type configuration.

The build type configuration matches the pattern established in other modules, properly enabling all Android build types for annotation processing.

shared/network/graphql/build.gradle.kts (1)

18-18: LGTM: Consistent build type configuration.

The build type configuration properly enables all Android build types for this module's annotation processing, maintaining consistency across the codebase.

shared/feature/build.gradle.kts (1)

17-17: LGTM: Consistent build type configuration.

The build type configuration is properly applied alongside the existing useKoin and useComponentFactory settings, enabling comprehensive annotation processing for all build variants.

buildSrc/src/main/kotlin/app/futured/kmptemplate/gradle/configuration/ProjectSettings.kt (1)

30-30: LGTM: Clean aggregation of build type constants.

The all property provides a convenient single source of truth for iterating over all build types, eliminating duplication across module configurations.

convention-plugins/src/main/kotlin/conventions-annotations-processor.gradle.kts (3)

13-26: LGTM: Well-documented extension properties.

The new configuration properties are clearly documented and provide a clean API for configuring annotation processing behavior across modules.


36-36: LGTM: KOIN_CONFIG_CHECK disabled as intended.

Setting KOIN_CONFIG_CHECK to false aligns with the past review comment indicating that Koin annotations has issues detecting dependencies with named qualifiers. This is a deliberate configuration choice.


76-82: Task naming convention is correct—no issues found.

KSP creates task names like kspDebugKotlinAndroid and kspReleaseKotlinAndroid for Android build variants, which matches the pattern used in the code: "ksp${it.uppercaseFirstChar()}KotlinAndroid". The mustRunAfter constraint will work as intended; the named tasks will be found and the dependency will be properly wired.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee2d73a and 952470d.

📒 Files selected for processing (2)
  • gradle.properties (1 hunks)
  • gradle/libs.versions.toml (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-03T08:24:27.077Z
Learnt from: CR
Repo: futuredapp/kmp-futured-template PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-03T08:24:27.077Z
Learning: Applies to **/*.{android.kt,ios.kt} : Platform-specific code: Place implementations in files suffixed with .android.kt and .ios.kt

Applied to files:

  • gradle/libs.versions.toml
⏰ 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). (2)
  • GitHub Check: check-android / Lint & Tests
  • GitHub Check: check-ios / Test
🔇 Additional comments (2)
gradle.properties (1)

2-3: Good fix: syntax error corrected and Kotlin daemon options properly separated.

The previous syntax error (trailing quote) has been resolved, and the kotlin.daemon.jvm.options are now correctly isolated from org.gradle.jvmargs, which is a cleaner configuration approach.

gradle/libs.versions.toml (1)

22-23: Verify Ktorfit 2.6.5 compatibility with Ktor 3.3.3.

The previous review identified that Ktorfit 2.6.4's Ktor version is 3.2.1. The patch-level bump to Ktorfit 2.6.5 may not add support for Ktor 3.3.3 (a minor version ahead). Please verify this pairing is supported, either by testing the build or checking Ktorfit 2.6.5 release notes.

ksp = "2.1.20-1.0.32" # Must be compatible with: `kotlin`
agp = "8.13.1"
kotlin = "2.2.20"
ksp = "2.3.0"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

CRITICAL: KSP version does not meet Koin Annotations 2.3.1 requirement.

Koin Annotations 2.3.1 requires KSP 2.3.2, but Line 4 specifies KSP 2.3.0. This version mismatch will cause compilation failures.

Update Line 4 to match the requirement:

- ksp = "2.3.0"
+ ksp = "2.3.2"

Also applies to: 13-13

🤖 Prompt for AI Agents
In gradle/libs.versions.toml around lines 4 and 13, the KSP version is pinned to
2.3.0 which is incompatible with Koin Annotations 2.3.1; update the ksp entries
on those lines to 2.3.2 so they match Koin's requirement (ensure both
occurrences are changed and any related dependency entries remain consistent).

@davidkocnar
Copy link
Member

Koin Annotations 2.3.2-Beta1 and KSP 2.3.2 did not fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android Android-related issues kmp KMP-related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants