Skip to content

🐛 Fix iOS lags + 🔄 Update dependencies #49

Open
MatuskaDev wants to merge 8 commits into
mainfrom
fix/ios-compose-lags
Open

🐛 Fix iOS lags + 🔄 Update dependencies #49
MatuskaDev wants to merge 8 commits into
mainfrom
fix/ios-compose-lags

Conversation

@MatuskaDev

@MatuskaDev MatuskaDev commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📝 Description

  • Update project dependencies
  • Use latest Compose Multiplatform (1.11 Beta) which fixes stutter on iOS

Summary by CodeRabbit

  • Build & Infrastructure

    • Upgraded Gradle from 8.13 to 9.4.1 with improved wrapper configuration
    • Updated Kotlin toolchain from 2.2.10 to 2.3.20
    • Improved Gradle wrapper startup and Java discovery performance
  • iOS Enhancements

    • Added automatic Moko resources copying to app during builds
    • Optimized SwiftLint configuration for better build directory handling
    • Refined native framework binary configuration
  • Dependency Updates

    • Updated Android SDK compile target to 36
    • Bumped multiple libraries (Ktor, Compose, Koin, and others)

@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown

Walkthrough

This PR modernizes the project's build infrastructure by updating the Gradle wrapper (8.13→9.4.1), bumping key dependencies including Kotlin (2.2.10→2.3.20) and Android SDK (35→36), migrating from kotlinx.datetime.Instant to kotlin.time.Instant in iOS interop code, refactoring Konsist tests to exclude iOS scope, and adding a build phase for moko resources in Xcode.

Changes

Cohort / File(s) Summary
Gradle Wrapper & Script Updates
gradle/wrapper/gradle-wrapper.properties, gradlew, gradlew.bat
Updated Gradle wrapper from 8.13 to 9.4.1-bin; modernized POSIX shell script with simplified ulimit logic, updated Java detection, replaced argument escaping with xargs/sed parsing; added Apache license header and heap defaults (-Xmx64m/-Xms64m) to Windows batch script; added timeout and distribution URL validation.
Version Catalog & Build Configuration
gradle/libs.versions.toml, build.gradle.kts
Bumped Kotlin 2.2.10→2.3.20, SDK-compile 35→36; aligned jetbrains-kotlin-jvm plugin to use shared kotlin version ref instead of separate ref; updated 20+ library versions (dateTime, Koin, AndroidX, Compose, Ktor, Molecule, desugar, etc.); replaced toUpperCase() with uppercase() in version stability check; switched clean task from eager tasks.create to lazy tasks.register with layout.buildDirectory.
KMP Native & Gradle Properties
build-logic/convention/src/main/kotlin/config/KmpConfig.kt, gradle.properties
Changed framework binary configuration to use static binaries (isStatic = true); removed native cache kind configuration for iOS device and simulator builds.
Kotlin Type Constraints
build-logic/convention/src/main/kotlin/extensions/PojectExtensions.kt
Added generic type constraint BuildTypeT : Any to demo extension function on NamedDomainObjectContainer.
Kotlin/DateTime Import Migration
shared/umbrella/src/iosMain/kotlin/kmp/shared/umbrella/KotlinDateTime.kt
Replaced kotlinx.datetime.Instant import with kotlin.time.Instant; updated companion extension target accordingly.
Swift Interoperability Updates
shared/umbrella/src/iosMain/swift/extensions/Interoperability+Extensions.swift
Updated Swift extensions from Kotlinx_datetimeInstant to KotlinInstant for instant conversions (asDate property and Date.asInstant return type).
iOS Swift Code Cleanup
ios/PresentationLayer/UIToolkit/Sources/UIToolkit/Extensions/View+Extensions.swift
Removed @inlinable attribute from bindViewModel method declaration.
iOS Configuration
ios/.swiftlint.yml, ios/MateeStarter.xcodeproj/project.pbxproj
Replaced specific .build directory exclusions in SwiftLint with broad recursive pattern "**/.build/**"; added new "Copy moko resources to app" build phase to MateeStarter target invoking :shared:umbrella:copyFrameworkResourcesToApp Gradle task with moko resource parameters.
Konsist Test Scope Refactoring
shared/umbrella/src/androidUnitTest/kotlin/konsistTest/*.kt
Created new helper function scopeFromProjectExcludingIos() in dedicated KonsistScope.kt file; updated all seven test classes (Compose, General, Data, Koin, Domain Models, UseCase, Repository) to use iOS-excluding scope instead of Konsist.scopeFromProject().

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • JuliaJakubcova
  • tomas-bat
  • vojta-horanek

Poem

🐰 Gradle hops with version nine,
Static frameworks, iOS fine,
Instant flows through Kotlin's streams,
Tests exclude what's in iOS schemes,
Moko resources hop along!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.01% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title effectively summarizes the main objectives: fixing iOS performance issues and updating dependencies, which align with the comprehensive changeset.
Description check ✅ Passed The description covers the primary changes (dependency updates and Compose Multiplatform fix for iOS) but omits non-critical template sections like detailed breakdown and references.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ios-compose-lags

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates build logic, dependency versions, and the Gradle wrapper, while switching iOS frameworks to static linking. Feedback identifies several critical issues, primarily the use of non-existent versions for the Android SDK, Kotlin, Compose Multiplatform, and Gradle. Additionally, the changes introduce compilation and interoperability errors regarding the Instant type in both Kotlin and Swift, and the removal of x86 targets drops support for Intel-based Mac simulators.

Comment thread gradle/libs.versions.toml
Comment thread gradle/libs.versions.toml Outdated
Comment thread gradle/libs.versions.toml
Comment thread gradle/wrapper/gradle-wrapper.properties
Comment thread build-logic/convention/src/main/kotlin/config/KmpConfig.kt

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@build-logic/convention/src/main/kotlin/config/KmpConfig.kt`:
- Around line 49-52: The framework is being built static (see the
binaries.framework block with baseName = nativeName, isStatic = true,
export(libs.mokoResources)), but static Apple frameworks can’t embed
moko-resources, so add an Xcode "Run Script" build phase to copy the framework
resources into the app bundle after Kotlin compilation; implement a script that
runs in the app target (e.g., named copy${nativeName}FrameworkResourcesToApp or
copyFrameworkResourcesToApp) which locates the built ${nativeName}.framework
Resources directory and copies its contents into
${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH} (or use the standard
FRAMEWORKS_FOLDER_PATH/Resources paths), and ensure this phase runs after the
Kotlin/Gradle build step so strings/images/localizations from moko-resources are
available at runtime.

In `@gradle/libs.versions.toml`:
- Line 33: The moko-resources entry in the version catalog (mokoResources) is
incompatible with Kotlin/Native because moko-resources 0.26.1 was compiled
against Kotlin 2.1.0; update the project so Kotlin and the library use the same
Kotlin compiler version: either bump mokoResources in libs.versions.toml to a
moko-resources release built for Kotlin 2.3.x (preferred) or revert the project
Kotlin version to 2.1.0; ensure the static framework export in KmpConfig.kt
remains intact and run a clean rebuild to verify no KLIB incompatibility errors
on iOS/macOS.

In `@gradle/wrapper/gradle-wrapper.properties`:
- Line 3: The Gradle wrapper version in distributionUrl
(gradle-wrapper.properties) is set to 9.4.1 which is incompatible with the
pinned Kotlin version in gradle/libs.versions.toml (Kotlin 2.3.10); either
downgrade the wrapper to a supported Gradle ≤9.0.0 by updating distributionUrl
and regenerating gradlew and gradlew.bat, or upgrade the Kotlin and Compose
Multiplatform versions in gradle/libs.versions.toml to releases JetBrains
documents as compatible with Gradle 9.4.1 and then regenerate the wrapper
scripts; ensure the change is consistent across distributionUrl,
gradle/libs.versions.toml (Kotlin version), and the regenerated gradlew files.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4e0c6d6b-1300-40a9-97b4-13bec02d5044

📥 Commits

Reviewing files that changed from the base of the PR and between ac64be1 and a782068.

⛔ Files ignored due to path filters (1)
  • gradle/wrapper/gradle-wrapper.jar is excluded by !**/*.jar
📒 Files selected for processing (11)
  • build-logic/convention/src/main/kotlin/config/KmpConfig.kt
  • build-logic/convention/src/main/kotlin/extensions/PojectExtensions.kt
  • build.gradle.kts
  • gradle.properties
  • gradle/libs.versions.toml
  • gradle/wrapper/gradle-wrapper.properties
  • gradlew
  • gradlew.bat
  • ios/PresentationLayer/UIToolkit/Sources/UIToolkit/Extensions/View+Extensions.swift
  • shared/umbrella/src/iosMain/kotlin/kmp/shared/umbrella/KotlinDateTime.kt
  • shared/umbrella/src/iosMain/swift/extensions/Interoperability+Extensions.swift
💤 Files with no reviewable changes (1)
  • gradle.properties

Comment on lines 49 to 52
it.binaries.framework {
baseName = nativeName
isStatic = false
isStatic = true
export(libs.mokoResources)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify that iOS/tvOS integration copies moko-resources when the KMP framework is static.
rg -n -C2 --glob '!**/build/**' \
  'copy[A-Za-z0-9]*FrameworkResourcesToApp|copyFrameworkResourcesToApp|moko\.resources' \
  --glob '*.pbxproj' \
  --glob 'Podfile' \
  --glob 'Podfile.lock' \
  --glob '*.kts' \
  --glob '*.gradle' || true

echo
echo "Expected: at least one Xcode/Pod build phase references the generated copy task."

Repository: MateeDevs/MateeStarter

Length of output: 147


Add Xcode build phase to copy moko-resources from the static framework.

Line 51 makes the Apple framework static while exporting libs.mokoResources. Per moko-resources documentation, static Apple frameworks cannot carry their own resources; the app must run a separate Xcode build phase (e.g., copy<FrameworkName>FrameworkResourcesToApp or copyFrameworkResourcesToApp) after Kotlin compilation to copy resources in. No such configuration was found in the repository. Without this build phase, iOS/tvOS will lose access to strings, images, and localizations at runtime.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@build-logic/convention/src/main/kotlin/config/KmpConfig.kt` around lines 49 -
52, The framework is being built static (see the binaries.framework block with
baseName = nativeName, isStatic = true, export(libs.mokoResources)), but static
Apple frameworks can’t embed moko-resources, so add an Xcode "Run Script" build
phase to copy the framework resources into the app bundle after Kotlin
compilation; implement a script that runs in the app target (e.g., named
copy${nativeName}FrameworkResourcesToApp or copyFrameworkResourcesToApp) which
locates the built ${nativeName}.framework Resources directory and copies its
contents into ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH} (or use
the standard FRAMEWORKS_FOLDER_PATH/Resources paths), and ensure this phase runs
after the Kotlin/Gradle build step so strings/images/localizations from
moko-resources are available at runtime.

Comment thread gradle/libs.versions.toml Outdated
Comment thread gradle/wrapper/gradle-wrapper.properties

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
android/shared/src/main/kotlin/kmp/android/shared/navigation/Destination.kt (1)

70-70: 🧹 Nitpick | 🔵 Trivial

TODO: Type-safe route argument construction.

The TODO comment indicates a known limitation: there's no compile-time guarantee that route arguments are provided in the correct order and type when calling Destination.invoke(...).

Consider implementing a type-safe builder pattern or using Kotlin's context receivers/contracts to enforce correct argument types at compile time. Would you like me to open an issue to track this improvement or help design a type-safe alternative?

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@android/shared/src/main/kotlin/kmp/android/shared/navigation/Destination.kt`
at line 70, The TODO notes that Destination.invoke(...) allows untyped/ordered
arguments; to fix, make route construction type-safe by introducing a typed
RouteBuilder/Factory per route and stop exposing the raw Destination.invoke
signature: add a generic RouteBuilder<T> (or per-route sealed/data class) that
enforces argument names/types and order and provide route-specific factory
functions (e.g., MyRoute.build(...) or MyRoute.Factory.create(...)) that return
a Destination instance; change Destination.invoke to internal/private and
replace callers to use the new route-specific builders so argument types are
checked at compile time (reference symbols: Destination.invoke, Destination
class, RouteBuilder/Factory and route-specific factory function names).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@android/shared/src/main/kotlin/kmp/android/shared/navigation/Destination.kt`:
- Around line 101-120: The current else branch in the args building logic
(inside the mapping over routeArguments.zip(arguments)) converts a null value
for a nullable argument into the literal string "null" via value.toString();
change this so that when value == null and arg.argument.isNullable is true you
omit the parameter entirely (return an empty list) instead of
listOf(Pair(arg.name, value.toString())), while keeping the existing require
check for non-nullable args; update the mapping in the block referencing
routeArguments, arguments, arg and value so nullable-null returns no Pair and
only non-null values are turned into Pair(arg.name, value.toString()).

In
`@shared/samplefeature/src/commonTest/kotlin/kmp/shared/samplefeature/presentation/vm/SampleFeatureViewModelTest.kt`:
- Around line 135-146: The test uses a fixed kotlinx.coroutines.delay(50) to
wait for the collector to start (around the eventChannel/eventJob and
viewModel.events.collect logic), which is flaky; replace the delay with a
deterministic handshake: create a CompletableDeferred<Unit> (e.g.,
collectorReady), complete it inside the launched collector coroutine immediately
before calling viewModel.events.collect, and then await
collectorReady.complete() (collectorReady.await()) in the test instead of using
delay; this ensures the collector in SampleFeatureViewModelTest is started
deterministically before triggering intents while keeping the existing
eventChannel/eventJob and collect logic intact.

In
`@shared/umbrella/src/androidUnitTest/kotlin/konsistTest/domain/usecase/UseCaseTest.kt`:
- Around line 90-93: The predicate passed to withParameters is unsafe because it
calls params.first() and can throw when params is empty; update the lambda in
UseCaseTest.kt (the withParameters { params -> ... } block) to guard against
empty parameter lists (e.g., return false when params.isEmpty()) or use safe
access like params.firstOrNull() / params.singleOrNull() and then check the
found param's type against paramDateClass.fullyQualifiedName; ensure the
predicate returns a Boolean without ever calling first() on an empty collection.

In `@shared/umbrella/src/iosMain/kotlin/kmp/shared/umbrella/KotlinDateTime.kt`:
- Around line 13-15: The current helper fun Instant.Companion.dummy(): Nothing =
TODO() throws NotImplementedError; change it to a safe no-op by updating the
signature to return Unit and implementing an empty body (e.g., fun
Instant.Companion.dummy(): Unit = Unit) so it still forces companion inclusion
for framework export but no longer contains a crash path.

In `@shared/umbrella/src/iosMain/kotlin/kmp/shared/umbrella/SwiftCoroutines.kt`:
- Around line 26-30: The iosDefaultScope currently recreates a SupervisorJob on
every access because coroutineContext is a getter; change it to hold a single
stable context by creating the SupervisorJob once and using that same Job plus
Dispatchers.Default for the CoroutineScope. Specifically, replace the computed
coroutineContext getter with a single initialized context (or construct
CoroutineScope(SupervisorJob() + Dispatchers.Default)) so that iosDefaultScope,
its SupervisorJob and coroutineContext remain stable across accesses and support
proper cancellation and lifecycle management.

---

Outside diff comments:
In `@android/shared/src/main/kotlin/kmp/android/shared/navigation/Destination.kt`:
- Line 70: The TODO notes that Destination.invoke(...) allows untyped/ordered
arguments; to fix, make route construction type-safe by introducing a typed
RouteBuilder/Factory per route and stop exposing the raw Destination.invoke
signature: add a generic RouteBuilder<T> (or per-route sealed/data class) that
enforces argument names/types and order and provide route-specific factory
functions (e.g., MyRoute.build(...) or MyRoute.Factory.create(...)) that return
a Destination instance; change Destination.invoke to internal/private and
replace callers to use the new route-specific builders so argument types are
checked at compile time (reference symbols: Destination.invoke, Destination
class, RouteBuilder/Factory and route-specific factory function names).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e9e9813d-ceac-4cb0-bb57-32c49af92e3e

📥 Commits

Reviewing files that changed from the base of the PR and between a782068 and 9f04bfa.

📒 Files selected for processing (71)
  • .editorconfig
  • android/app/src/androidTest/kotlin/kmp/android/extension/AndroidComposeTestRule.kt
  • android/app/src/androidTest/kotlin/kmp/android/extension/ComposeContentTestRule.kt
  • android/app/src/androidTest/kotlin/kmp/android/extension/SemanticsNodeInteractionsProvider.kt
  • android/app/src/androidTest/kotlin/kmp/android/screen/Screen.kt
  • android/app/src/androidTest/kotlin/kmp/android/util/TestRunner.kt
  • android/app/src/main/kotlin/kmp/android/MainApp.kt
  • android/app/src/main/kotlin/kmp/android/di/RootModule.kt
  • android/samplefeature/src/main/kotlin/kmp/android/samplefeature/navigation/SampleFeatureGraph.kt
  • android/samplefeature/src/main/kotlin/kmp/android/samplefeature/navigation/SampleFeatureNavigation.kt
  • android/samplefeature/src/main/kotlin/kmp/android/samplefeature/ui/SampleFeatureMain.kt
  • android/shared/src/main/kotlin/kmp/android/shared/navigation/Destination.kt
  • shared/analytics/src/androidMain/kotlin/kmp/shared/analytics/data/provider/AndroidAnalyticsProviderImpl.kt
  • shared/analytics/src/androidMain/kotlin/kmp/shared/analytics/di/AnalyticsModule.android.kt
  • shared/analytics/src/commonMain/kotlin/kmp/shared/analytics/data/repository/AnalyticsRepositoryImpl.kt
  • shared/analytics/src/commonMain/kotlin/kmp/shared/analytics/di/AnalyticsModule.kt
  • shared/analytics/src/commonMain/kotlin/kmp/shared/analytics/domain/model/ToastAnalytics.kt
  • shared/analytics/src/commonMain/kotlin/kmp/shared/analytics/domain/usecase/TrackAnalyticsEventUseCase.kt
  • shared/auth/src/androidMain/kotlin/kmp/shared/auth/di/AuthModule.android.kt
  • shared/auth/src/commonMain/kotlin/kmp/shared/auth/data/provider/AuthProviderImpl.kt
  • shared/auth/src/commonMain/kotlin/kmp/shared/auth/data/remote/AuthService.kt
  • shared/auth/src/commonMain/kotlin/kmp/shared/auth/data/remote/MockTokenRefresher.kt
  • shared/auth/src/commonMain/kotlin/kmp/shared/auth/di/AuthModule.kt
  • shared/auth/src/iosMain/kotlin/kmp/shared/auth/di/AuthModule.ios.kt
  • shared/base/build.gradle.kts
  • shared/base/src/androidMain/kotlin/kmp/shared/base/data/preferences/SecureSharedPreferences.kt
  • shared/base/src/androidMain/kotlin/kmp/shared/base/data/preferences/SharedPreferencesFactory.kt
  • shared/base/src/androidMain/kotlin/kmp/shared/base/data/preferences/SharedPreferencesType.kt
  • shared/base/src/androidMain/kotlin/kmp/shared/base/di/BaseModule.android.kt
  • shared/base/src/androidMain/kotlin/kmp/shared/base/domain/system/ConfigImpl.kt
  • shared/base/src/androidMain/kotlin/kmp/shared/base/presentation/vm/BaseScopedViewModel.android.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/data/provider/AuthProvider.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/data/remote/HttpClient.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/di/BaseModule.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/domain/error/domain/BackendError.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/domain/error/domain/CommonError.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/domain/error/util/Network.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/domain/model/Result.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/domain/system/ApiVariant.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/domain/util/extension/Result.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/presentation/ui/TestTag.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/presentation/ui/Theme.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/presentation/ui/Values.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/presentation/vm/BaseScopedViewModel.kt
  • shared/base/src/iosMain/kotlin/kmp/shared/base/data/keychain/KeychainFactory.kt
  • shared/base/src/iosMain/kotlin/kmp/shared/base/data/userdefaults/UserDefaultsFactory.kt
  • shared/base/src/iosMain/kotlin/kmp/shared/base/di/BaseModule.ios.kt
  • shared/base/src/iosMain/kotlin/kmp/shared/base/presentation/ui/PlatformSpecificButtonIndication.ios.kt
  • shared/base/src/iosMain/kotlin/kmp/shared/base/presentation/vm/BaseScopedViewModel.ios.kt
  • shared/samplefeature/src/commonMain/kotlin/kmp/shared/samplefeature/data/model/JokeDto.kt
  • shared/samplefeature/src/commonMain/kotlin/kmp/shared/samplefeature/data/repository/JokeRepositoryImpl.kt
  • shared/samplefeature/src/commonMain/kotlin/kmp/shared/samplefeature/data/service/JokeService.kt
  • shared/samplefeature/src/commonMain/kotlin/kmp/shared/samplefeature/data/source/impl/JokeSourceImpl.kt
  • shared/samplefeature/src/commonMain/kotlin/kmp/shared/samplefeature/di/SampleFeatureModule.kt
  • shared/samplefeature/src/commonMain/kotlin/kmp/shared/samplefeature/domain/usecase/GetRandomJokeUseCase.kt
  • shared/samplefeature/src/commonMain/kotlin/kmp/shared/samplefeature/presentation/ui/test/TestTags.kt
  • shared/samplefeature/src/commonMain/kotlin/kmp/shared/samplefeature/presentation/vm/SampleFeatureViewModel.kt
  • shared/samplefeature/src/commonTest/kotlin/kmp/shared/samplefeature/data/model/JokeConversionTest.kt
  • shared/samplefeature/src/commonTest/kotlin/kmp/shared/samplefeature/domain/usecase/GetRandomJokeUseCaseTest.kt
  • shared/samplefeature/src/commonTest/kotlin/kmp/shared/samplefeature/presentation/vm/SampleFeatureViewModelTest.kt
  • shared/samplefeature/src/iosMain/kotlin/kmp/shared/samplefeature/presentation/SampleFeatureMainScreenViewController.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/android/compose/ComposeTest.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/common/GeneralTest.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/data/DataTest.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/di/KoinTest.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/domain/model/DomainModelsTest.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/domain/usecase/UseCaseTest.kt
  • shared/umbrella/src/commonMain/kotlin/kmp/shared/umbrella/di/UmbrellaModule.kt
  • shared/umbrella/src/iosMain/kotlin/kmp/shared/umbrella/KotlinDateTime.kt
  • shared/umbrella/src/iosMain/kotlin/kmp/shared/umbrella/SwiftCoroutines.kt
  • shared/umbrella/src/iosMain/kotlin/kmp/shared/umbrella/di/KoinIOS.kt
💤 Files with no reviewable changes (6)
  • shared/auth/src/commonMain/kotlin/kmp/shared/auth/data/provider/AuthProviderImpl.kt
  • android/samplefeature/src/main/kotlin/kmp/android/samplefeature/navigation/SampleFeatureGraph.kt
  • shared/base/src/commonMain/kotlin/kmp/shared/base/presentation/ui/Values.kt
  • shared/analytics/src/androidMain/kotlin/kmp/shared/analytics/data/provider/AndroidAnalyticsProviderImpl.kt
  • shared/base/src/iosMain/kotlin/kmp/shared/base/data/keychain/KeychainFactory.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/domain/model/DomainModelsTest.kt

Comment thread android/shared/src/main/kotlin/kmp/android/shared/navigation/Destination.kt Outdated
Comment thread shared/umbrella/src/iosMain/kotlin/kmp/shared/umbrella/SwiftCoroutines.kt Outdated

@JuliaJakubcova JuliaJakubcova left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also konsist tests are broken, probably because of some of the updated versions, can you fix them, please? You can run them with ./gradlew testAlphaDebugUnitTest or by right clicking on konsistTest folder and Run tests in konsistTest

Comment thread android/app/src/androidTest/kotlin/kmp/android/util/TestRunner.kt Outdated
Comment thread build-logic/convention/src/main/kotlin/config/KmpConfig.kt
Comment thread gradle/libs.versions.toml
Comment thread gradle/libs.versions.toml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (1)
shared/umbrella/src/androidUnitTest/kotlin/konsistTest/domain/usecase/UseCaseTest.kt (1)

83-86: ⚠️ Potential issue | 🟡 Minor

Previously reported: params.first() is still unsafe in predicate.

Line 84 can still throw when params is empty, causing hard failure instead of a clean false predicate result.

Suggested fix
                 val implementationHasParams = implementation
                     .functions()
                     .withName("invoke")
                     .withParameters { params ->
-                        val param = params.first()
+                        val param = params.singleOrNull() ?: return@withParameters false
                         param.type.fullyQualifiedName == paramDateClass.fullyQualifiedName
                     }.size == 1
#!/bin/bash
set -euo pipefail

echo "== Current predicate in UseCaseTest =="
fd -HI 'UseCaseTest.kt' --exec sed -n '75,100p' {}

echo
echo "== Potential zero-arg invoke declarations =="
rg -n --type=kotlin '\bfun\s+invoke\s*\(\s*\)'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@shared/umbrella/src/androidUnitTest/kotlin/konsistTest/domain/usecase/UseCaseTest.kt`
around lines 83 - 86, The predicate passed to withParameters uses params.first()
which can throw on empty lists; change it to a null-safe check such as using
params.singleOrNull() and safe navigation: replace the body of the
withParameters lambda so it returns
(params.singleOrNull()?.type?.fullyQualifiedName ==
paramDateClass.fullyQualifiedName) instead of using params.first(), ensuring the
predicate yields false for empty or multi-arg parameter lists; keep references
to withParameters, params, and paramDateClass to locate the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@build.gradle.kts`:
- Line 2: The explicit import "import org.gradle.kotlin.dsl.register" is likely
unnecessary; remove that import line to rely on standard Gradle Kotlin DSL
implicit imports and reduce clutter, but if you added it to fix an IDE or
compilation error keep it and add a brief comment above explaining why it’s
required (e.g., “Required to resolve register(...) in this Gradle/KTS context”);
target the import statement referencing org.gradle.kotlin.dsl.register and
adjust accordingly.

In `@ios/MateeStarter.xcodeproj/project.pbxproj`:
- Around line 348-366: The build phase PBXShellScriptBuildPhase named "Copy moko
resources to app" invokes the non-existent Gradle task
":shared:umbrella:copyFrameworkResourcesToApp" in its shellScript; fix by either
adding/applying the moko-resources/multiplatformResources configuration in
shared/umbrella/build.gradle.kts so that the task is created, or update the
shellScript to call the correct existing Gradle task (replace
":shared:umbrella:copyFrameworkResourcesToApp" inside the shellScript property
of the PBXShellScriptBuildPhase with the actual task name exposed by your Gradle
build). Ensure the change keeps the same parameter args (-Pmoko.resources.*) if
the task expects them.

In
`@shared/umbrella/src/iosMain/swift/extensions/Interoperability`+Extensions.swift:
- Around line 91-94: The Swift Date.asInstant extension expects a
kotlin.time.Instant but KotlinDateTimeKt.toInstant currently returns a
kotlinx.datetime.Instant; update the Kotlin side so
KotlinDateTimeKt.toInstant(self: NSDate) (or the function used by the Swift
bridge) returns a kotlin.time.Instant directly instead of
kotlinx.datetime.Instant — convert the underlying milliseconds/nanoseconds to
kotlin.time.Instant (e.g. via kotlin.time.Instant.fromEpochMilliseconds or
equivalent) and update any uses of toKotlinInstant() to produce
kotlin.time.Instant so the Swift extension Date.asInstant returns the correct
kotlin.time.Instant type.

---

Duplicate comments:
In
`@shared/umbrella/src/androidUnitTest/kotlin/konsistTest/domain/usecase/UseCaseTest.kt`:
- Around line 83-86: The predicate passed to withParameters uses params.first()
which can throw on empty lists; change it to a null-safe check such as using
params.singleOrNull() and safe navigation: replace the body of the
withParameters lambda so it returns
(params.singleOrNull()?.type?.fullyQualifiedName ==
paramDateClass.fullyQualifiedName) instead of using params.first(), ensuring the
predicate yields false for empty or multi-arg parameter lists; keep references
to withParameters, params, and paramDateClass to locate the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ebca24d3-89ce-4c5a-9724-d40b61387b2b

📥 Commits

Reviewing files that changed from the base of the PR and between 9f04bfa and ee2be57.

⛔ Files ignored due to path filters (1)
  • gradle/wrapper/gradle-wrapper.jar is excluded by !**/*.jar
📒 Files selected for processing (21)
  • build-logic/convention/src/main/kotlin/config/KmpConfig.kt
  • build-logic/convention/src/main/kotlin/extensions/PojectExtensions.kt
  • build.gradle.kts
  • gradle.properties
  • gradle/libs.versions.toml
  • gradle/wrapper/gradle-wrapper.properties
  • gradlew
  • gradlew.bat
  • ios/.swiftlint.yml
  • ios/MateeStarter.xcodeproj/project.pbxproj
  • ios/PresentationLayer/UIToolkit/Sources/UIToolkit/Extensions/View+Extensions.swift
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/KonsistScope.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/android/compose/ComposeTest.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/common/GeneralTest.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/data/DataTest.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/di/KoinTest.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/domain/model/DomainModelsTest.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/domain/usecase/UseCaseTest.kt
  • shared/umbrella/src/androidUnitTest/kotlin/konsistTest/repository/RepositoryTest.kt
  • shared/umbrella/src/iosMain/kotlin/kmp/shared/umbrella/KotlinDateTime.kt
  • shared/umbrella/src/iosMain/swift/extensions/Interoperability+Extensions.swift
💤 Files with no reviewable changes (1)
  • gradle.properties

Comment thread build.gradle.kts
Comment thread ios/MateeStarter.xcodeproj/project.pbxproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants