Skip to content

Make Android project Kotlin Multiplatform (iOS + Desktop)#5

Open
Copilot wants to merge 13 commits into
mainfrom
copilot/make-project-multiplatform
Open

Make Android project Kotlin Multiplatform (iOS + Desktop)#5
Copilot wants to merge 13 commits into
mainfrom
copilot/make-project-multiplatform

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 12, 2026

Summary

Migrates the existing Android-only task manager app to Kotlin Multiplatform, adding iOS and Desktop targets while keeping the Android app fully functional.

What Changed

New Platforms

  • Desktop (desktopApp/): Compose Desktop app with full navigation, Koin DI, and SQLite JVM driver. Runs via ./gradlew :desktopApp:run.
  • iOS (iosApp/): Swift/SwiftUI entry point that bridges to the KMP Compose framework via MainViewControllerKt.MainViewController(). See iosApp/README.md for Xcode setup instructions.

Dependency Replacements

Before (Android-only) After (Multiplatform)
Hilt Koin 4.0.0
Room SQLDelight 2.0.2
DataStore multiplatform-settings 1.2.0
Jetpack Compose Compose Multiplatform 1.7.3
painterResource(R.drawable.*) Material Icons (Icons.Rounded.*)
stringResource(R.string.*) CMP stringResource(Res.string.*)
hiltViewModel() koinViewModel()
@StringRes Int? in ViewState String?

Module Changes

  • domainkotlin.multiplatform (jvm + iOS targets); System.currentTimeMillis()kotlinx-datetime Clock.System.now()
  • corekotlin.multiplatform (commonMain)
  • data → KMP with SQLDelight schema (Tasks.sq), expect/actual DatabaseDriverFactory and SettingsFactory for Android/iOS/JVM, Koin dataModule
  • ui → Compose Multiplatform; all strings consolidated in composeResources/values/strings.xml with 5 language translations; Android vector drawables replaced by Material Icons
  • feature/tasklist, feature/taskeditor, feature/settings → Compose Multiplatform + Koin ViewModels
  • app → Koin startKoin in TaskManagerApp, all Hilt DI modules removed

Architecture

All shared business logic and UI is in commonMain source sets. Platform-specific code is isolated in androidMain, iosMain, and jvmMain:

  • Database driver initialization (Android SQLite, iOS NativeSQLite, JVM JDBC SQLite)
  • Settings storage (Android SharedPreferences, iOS NSUserDefaults, JVM Java Preferences)

Copilot AI and others added 13 commits April 12, 2026 07:17
- Add KMP versions: composeMultiplatform, koin, sqldelight, multiplatformSettings, kotlinxDatetime
- Add Koin, SQLDelight, multiplatform-settings, kotlinx-datetime, and compose-material-icons libraries
- Add kotlin-multiplatform, compose-multiplatform, sqldelight plugins
- Update root build.gradle.kts with new KMP plugins
- Add :desktopApp module to settings.gradle.kts
- Enable UIKit experimental compose support in gradle.properties

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
- Move domain sources from src/main/java to src/commonMain/kotlin
- Move core sources from src/main/java to src/commonMain/kotlin
- Update Task.kt to use kotlinx.datetime Clock instead of System.currentTimeMillis()
- Replace domain/build.gradle.kts with KMP configuration (jvm + iOS targets)
- Replace core/build.gradle.kts with KMP configuration (jvm + iOS targets)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
… Koin

- Replace build.gradle.kts: swap Room/DataStore/Hilt for SQLDelight/multiplatform-settings/Koin with KMP targets (android, jvm, iosX64, iosArm64, iosSimulatorArm64)
- Add SQLDelight schema (Tasks.sq) with TaskEntity table and CRUD queries
- Add commonMain expect classes: DatabaseDriverFactory, SettingsFactory
- Add commonMain implementations: TaskMapper, TaskRepositoryImpl, UserPreferencesRepositoryImpl, all use case impls, DataModule (Koin)
- Add androidMain actuals: AndroidSqliteDriver-based DatabaseDriverFactory, SharedPreferences-based SettingsFactory
- Add iosMain actuals: NativeSqliteDriver-based DatabaseDriverFactory, NSUserDefaults-based SettingsFactory
- Add jvmMain actuals: JdbcSqliteDriver-based DatabaseDriverFactory, Java Preferences-based SettingsFactory
- Remove old Room/Hilt/DataStore sources from src/main

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
Replace the inefficient approach of fetching all tasks to find the max
ID with a dedicated SQL query using last_insert_rowid(), which is both
more efficient and correct under concurrent access.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
- Replace Android-only build.gradle.kts with KMP configuration
  supporting androidTarget, jvm, iosX64, iosArm64, iosSimulatorArm64
- Move source files from src/main to src/commonMain
- Replace Android res strings with Compose Multiplatform composeResources
- Consolidate all locale strings (de, es, fr, it) from all modules
  into a single composeResources directory per locale
- Update theme files: remove Android status bar code from Theme.kt,
  rewrite Color.kt and Type.kt as pure KMP-compatible sources
- Update PriorityChip and TaskCard to use compose-resources stringResource
- Add minimal androidMain/AndroidManifest.xml

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
Access priority string resources via Res.string.* rather than
individual star-imported symbols.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
- Replace build.gradle.kts for tasklist, taskeditor, and settings modules
  with KMP configuration (androidTarget, jvm, iosX64, iosArm64, iosSimulatorArm64)
- Migrate source sets from src/main (Android-only) to src/commonMain (KMP)
- Replace Hilt DI with Koin (koin.core, koin.compose, koin.compose.viewmodel)
- Add Koin DI modules: TaskListModule, TaskEditorModule, SettingsModule
- Add AndroidManifest.xml to androidMain source sets
- Remove Android-specific res/ XML resources (strings, drawables) now handled
  by the shared :ui module via Compose Multiplatform resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
- Replace app/build.gradle.kts: remove Hilt/KSP/Room/DataStore, add Koin and SQLDelight Android driver
- Delete Hilt DI modules (app/src/main/java/fr/benju/tasks/di/)
- Replace TaskManagerApp: Hilt @HiltAndroidApp → Koin startKoin with DatabaseDriverFactory/SettingsFactory
- Replace MainActivity: @androidentrypoint + viewModels() → koinViewModel(), add @composable annotation to TaskManagerMainApp
- Create desktopApp/build.gradle.kts with KMP JVM target and Compose Desktop config
- Create desktopApp Main.kt with KoinApplication and Window entry point
- Create desktopApp DesktopApp.kt with shared navigation composable
- Create iosApp skeleton: iOSApp.swift, ContentView.swift, README.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
…atform-settings

- Update gradle/libs.versions.toml with KMP dependencies (Koin 4.x, SQLDelight 2.x, multiplatform-settings 1.2.0, kotlinx-datetime 0.6.1, Compose Multiplatform 1.7.3)
- Add kotlin.multiplatform, compose.multiplatform, and sqldelight plugins to root build.gradle.kts
- Add :desktopApp module to settings.gradle.kts
- Enable org.jetbrains.compose.experimental.uikit.enabled in gradle.properties
- Convert domain module to KMP (commonMain, jvm, iosX64/Arm64/SimulatorArm64)
  - Replace System.currentTimeMillis() with kotlinx.datetime.Clock
- Convert core module to KMP (commonMain)
  - Update TaskTestFactory to use Clock.System.now()
- Convert data module to KMP with SQLDelight + multiplatform-settings + Koin
  - SQLDelight schema in Tasks.sq
  - expect/actual DatabaseDriverFactory for Android/iOS/JVM
  - expect/actual SettingsFactory returning FlowSettings for Android/iOS/JVM
  - TaskRepositoryImpl, UserPreferencesRepositoryImpl in commonMain
  - All use case impls in commonMain (remove @Inject)
  - Koin dataModule in commonMain
  - Delete old Room/DataStore/Hilt test files
- Convert ui module to Compose Multiplatform
  - KMP-compatible Theme.kt (remove Android status bar code)
  - TaskCard uses Icons.Rounded.Delete instead of painterResource
  - PriorityChip uses Compose Resources stringResource
  - Consolidated all strings into ui/src/commonMain/composeResources/values/strings.xml
  - Localized strings for de/es/fr/it
- Convert feature/tasklist to Compose Multiplatform + Koin
  - Remove @HiltViewModel/@Inject, use koinViewModel()
  - Icons.Rounded.Settings and Icons.Rounded.Add replace drawables
  - Koin taskListModule with viewModelOf
- Convert feature/taskeditor to Compose Multiplatform + Koin
  - TaskEditorViewState.error changed from @stringres Int? to String?
  - Error messages inline strings instead of resource IDs
  - Koin taskEditorModule
- Convert feature/settings to Compose Multiplatform + Koin
  - Icons.AutoMirrored.Rounded.ArrowBack replaces painterResource
  - Koin settingsModule
- Update app module: remove Hilt, use Koin startKoin in TaskManagerApp
  - Remove @HiltAndroidApp, @androidentrypoint
  - koinViewModel() replaces viewModels()/hiltViewModel()
  - Delete all Hilt DI modules from app/di/
- Create desktopApp module with Compose Desktop + Koin
  - Main.kt with KoinApplication and Window
  - DesktopApp.kt with NavHost navigation
- Create iosApp skeleton with Swift entry points

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
Copilot AI requested a review from benju69 April 12, 2026 07:53
@benju69 benju69 marked this pull request as ready for review April 12, 2026 08:33
Copilot AI review requested due to automatic review settings April 12, 2026 08:33
Copy link
Copy Markdown
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

Migrates the existing Android task manager codebase to Kotlin Multiplatform (KMP), introducing iOS and Desktop targets while refactoring shared UI/resources and replacing Android-only persistence/DI with multiplatform alternatives.

Changes:

  • Adds Desktop (desktopApp/) and iOS (iosApp/) entry points wired to shared KMP UI.
  • Moves UI strings to Compose Multiplatform resources and replaces Android vector drawables with Material Icons.
  • Replaces Hilt/Room/DataStore with Koin/SQLDelight/multiplatform-settings and converts core/domain/data/feature modules to KMP source sets.

Reviewed changes

Copilot reviewed 100 out of 123 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
ui/src/main/res/values/strings.xml Removes Android-only string resources (migrated to Compose resources).
ui/src/main/res/values-it/strings.xml Removes Android-only Italian strings (migrated to Compose resources).
ui/src/main/res/values-fr/strings.xml Removes Android-only French strings (migrated to Compose resources).
ui/src/main/res/values-es/strings.xml Removes Android-only Spanish strings (migrated to Compose resources).
ui/src/main/res/values-de/strings.xml Removes Android-only German strings (migrated to Compose resources).
ui/src/main/res/drawable/ic_delete_rounded_24dp.xml Removes Android vector drawable (replaced by Material Icon).
ui/src/commonMain/kotlin/fr/benju/tasks/ui/theme/Type.kt Extends shared typography (adds bodySmall).
ui/src/commonMain/kotlin/fr/benju/tasks/ui/theme/Theme.kt Makes theme implementation platform-agnostic (removes Android window side effects).
ui/src/commonMain/kotlin/fr/benju/tasks/ui/theme/Color.kt Adds shared color palette for KMP theme.
ui/src/commonMain/kotlin/fr/benju/tasks/ui/components/TaskCard.kt Switches to Compose resources + Material Icons; removes Android resource usage.
ui/src/commonMain/kotlin/fr/benju/tasks/ui/components/PriorityChip.kt Switches priority labels to Compose resources.
ui/src/commonMain/composeResources/values/strings.xml Adds shared Compose Multiplatform strings (en).
ui/src/commonMain/composeResources/values-it/strings.xml Adds shared Compose Multiplatform strings (it).
ui/src/commonMain/composeResources/values-fr/strings.xml Adds shared Compose Multiplatform strings (fr).
ui/src/commonMain/composeResources/values-es/strings.xml Adds shared Compose Multiplatform strings (es).
ui/src/commonMain/composeResources/values-de/strings.xml Adds shared Compose Multiplatform strings (de).
ui/src/androidMain/AndroidManifest.xml Adds minimal manifest for KMP Android source set.
ui/build.gradle.kts Converts ui to KMP + Compose Multiplatform resources configuration.
settings.gradle.kts Includes the new :desktopApp module.
iosApp/README.md Documents iOS build + Xcode setup and the Compose bridge.
iosApp/iosApp/iOSApp.swift Adds SwiftUI app entry point for iOS.
iosApp/iosApp/ContentView.swift Bridges to the shared Compose UI via MainViewController().
gradle/libs.versions.toml Adds Compose Multiplatform, Koin, SQLDelight, multiplatform-settings, kotlinx-datetime versions/libs/plugins.
gradle.properties Enables experimental Compose UIKit support for iOS.
feature/tasklist/src/main/res/values/strings.xml Removes Android-only strings (migrated to Compose resources).
feature/tasklist/src/main/res/values-it/strings.xml Removes Android-only Italian strings (migrated to Compose resources).
feature/tasklist/src/main/res/values-fr/strings.xml Removes Android-only French strings (migrated to Compose resources).
feature/tasklist/src/main/res/values-es/strings.xml Removes Android-only Spanish strings (migrated to Compose resources).
feature/tasklist/src/main/res/values-de/strings.xml Removes Android-only German strings (migrated to Compose resources).
feature/tasklist/src/main/res/drawable/ic_settings_rounded_24dp.xml Removes Android vector drawable (replaced by Material Icon).
feature/tasklist/src/main/res/drawable/ic_add_task_rounded_24dp.xml Removes Android vector drawable (replaced by Material Icon).
feature/tasklist/src/commonMain/kotlin/fr/benju/tasks/feature/tasklist/TaskListViewState.kt Introduces KMP view state model.
feature/tasklist/src/commonMain/kotlin/fr/benju/tasks/feature/tasklist/TaskListViewModel.kt Removes Hilt wiring; keeps logic in shared ViewModel.
feature/tasklist/src/commonMain/kotlin/fr/benju/tasks/feature/tasklist/TaskListScreen.kt Migrates UI to Compose resources + Material Icons + Koin ViewModel.
feature/tasklist/src/commonMain/kotlin/fr/benju/tasks/feature/tasklist/di/TaskListModule.kt Adds Koin module for ViewModel wiring.
feature/tasklist/src/androidMain/AndroidManifest.xml Adds minimal manifest for KMP Android source set.
feature/tasklist/build.gradle.kts Converts feature module to KMP + Koin dependencies.
feature/taskeditor/src/main/res/values/strings.xml Removes Android-only strings (migrated to Compose resources).
feature/taskeditor/src/main/res/values-it/strings.xml Removes Android-only Italian strings (migrated to Compose resources).
feature/taskeditor/src/main/res/values-fr/strings.xml Removes Android-only French strings (migrated to Compose resources).
feature/taskeditor/src/main/res/values-es/strings.xml Removes Android-only Spanish strings (migrated to Compose resources).
feature/taskeditor/src/main/res/values-de/strings.xml Removes Android-only German strings (migrated to Compose resources).
feature/taskeditor/src/commonMain/kotlin/fr/benju/tasks/feature/taskeditor/TaskEditorViewState.kt Changes error representation to String? for KMP state.
feature/taskeditor/src/commonMain/kotlin/fr/benju/tasks/feature/taskeditor/TaskEditorViewModel.kt Removes Hilt wiring; updates error handling + KMP coroutine dispatching.
feature/taskeditor/src/commonMain/kotlin/fr/benju/tasks/feature/taskeditor/TaskEditorScreen.kt Migrates UI to Compose resources + Koin ViewModel.
feature/taskeditor/src/commonMain/kotlin/fr/benju/tasks/feature/taskeditor/di/TaskEditorModule.kt Adds Koin module for ViewModel wiring.
feature/taskeditor/src/androidMain/AndroidManifest.xml Adds minimal manifest for KMP Android source set.
feature/taskeditor/build.gradle.kts Converts feature module to KMP + Koin dependencies.
feature/settings/src/main/res/values/strings.xml Removes Android-only strings (migrated to Compose resources).
feature/settings/src/main/res/values-it/strings.xml Removes Android-only Italian strings (migrated to Compose resources).
feature/settings/src/main/res/values-fr/strings.xml Removes Android-only French strings (migrated to Compose resources).
feature/settings/src/main/res/values-es/strings.xml Removes Android-only Spanish strings (migrated to Compose resources).
feature/settings/src/main/res/values-de/strings.xml Removes Android-only German strings (migrated to Compose resources).
feature/settings/src/main/res/drawable/ic_arrow_back_rounded_24dp.xml Removes Android vector drawable (replaced by Material Icon).
feature/settings/src/commonMain/kotlin/fr/benju/tasks/feature/settings/SettingsViewModel.kt Removes Hilt wiring for settings; keeps shared state in ViewModel.
feature/settings/src/commonMain/kotlin/fr/benju/tasks/feature/settings/SettingsScreen.kt Migrates UI to Compose resources + Material Icons.
feature/settings/src/commonMain/kotlin/fr/benju/tasks/feature/settings/di/SettingsModule.kt Adds Koin module for ViewModel wiring.
feature/settings/src/androidMain/AndroidManifest.xml Adds minimal manifest for KMP Android source set.
feature/settings/build.gradle.kts Converts feature module to KMP + Koin dependencies.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/usecase/UpdateTaskUseCase.kt Adds shared use case interface for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/usecase/ToggleTaskStatusUseCase.kt Adds shared use case interface for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/usecase/SetDarkModeUseCase.kt Adds shared use case interface for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/usecase/GetTasksUseCase.kt Adds shared use case interface for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/usecase/GetTaskByIdUseCase.kt Adds shared use case interface for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/usecase/GetDarkModeUseCase.kt Adds shared use case interface for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/usecase/DeleteTaskUseCase.kt Adds shared use case interface for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/usecase/AddTaskUseCase.kt Adds shared use case interface for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/repository/UserPreferencesRepository.kt Adds shared preferences repository contract for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/repository/TaskRepository.kt Adds shared task repository contract for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/model/TaskFilter.kt Adds shared task filtering model for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/model/Task.kt Switches timestamps to kotlinx-datetime clock for KMP.
domain/src/commonMain/kotlin/fr/benju/tasks/domain/model/Priority.kt Adds shared priority enum for KMP.
domain/build.gradle.kts Converts domain module to KMP (JVM + iOS).
desktopApp/src/jvmMain/kotlin/fr/benju/tasks/desktop/Main.kt Adds Compose Desktop entry point with Koin + theme wiring.
desktopApp/src/jvmMain/kotlin/fr/benju/tasks/desktop/DesktopApp.kt Adds desktop navigation graph using shared screens.
desktopApp/build.gradle.kts Adds Compose Desktop module + dependencies.
data/src/test/java/fr/benju/tasks/data/usecase/GetTasksUseCaseImplTest.kt Removes old Android-only tests tied to pre-KMP implementations.
data/src/test/java/fr/benju/tasks/data/usecase/AddTaskUseCaseImplTest.kt Removes old Android-only tests tied to pre-KMP implementations.
data/src/test/java/fr/benju/tasks/data/repository/TaskRepositoryImplTest.kt Removes old Room-based repository tests.
data/src/test/java/fr/benju/tasks/data/mapper/TaskMapperTest.kt Removes old mapper tests tied to Room entity type.
data/src/main/java/fr/benju/tasks/data/repository/UserPreferencesRepositoryImpl.kt Removes Android DataStore-based implementation.
data/src/main/java/fr/benju/tasks/data/repository/TaskRepositoryImpl.kt Removes Room DAO-based implementation.
data/src/main/java/fr/benju/tasks/data/di/UseCaseModule.kt Removes Hilt bindings for use cases.
data/src/main/java/fr/benju/tasks/data/di/di/TaskEditorModule.kt Removes Hilt bindings for task editor use case.
data/src/main/java/fr/benju/tasks/data/database/TaskDatabase.kt Removes Room database.
data/src/main/java/fr/benju/tasks/data/database/entity/TaskEntity.kt Removes Room entity.
data/src/main/java/fr/benju/tasks/data/database/dao/TaskDao.kt Removes Room DAO.
data/src/jvmMain/kotlin/fr/benju/tasks/data/preferences/SettingsFactory.kt Adds JVM settings factory (Java Preferences).
data/src/jvmMain/kotlin/fr/benju/tasks/data/database/DatabaseDriverFactory.kt Adds JVM SQLDelight driver factory (JDBC SQLite).
data/src/iosMain/kotlin/fr/benju/tasks/data/preferences/SettingsFactory.kt Adds iOS settings factory (NSUserDefaults).
data/src/iosMain/kotlin/fr/benju/tasks/data/database/DatabaseDriverFactory.kt Adds iOS SQLDelight driver factory (Native SQLite).
data/src/commonMain/sqldelight/fr/benju/tasks/data/database/Tasks.sq Adds SQLDelight schema + queries.
data/src/commonMain/kotlin/fr/benju/tasks/data/usecase/UpdateTaskUseCaseImpl.kt Updates use case implementation for KMP + Koin wiring.
data/src/commonMain/kotlin/fr/benju/tasks/data/usecase/ToggleTaskStatusUseCaseImpl.kt Updates use case implementation for KMP + Koin wiring.
data/src/commonMain/kotlin/fr/benju/tasks/data/usecase/SetDarkModeUseCaseImpl.kt Updates use case implementation for KMP settings repository.
data/src/commonMain/kotlin/fr/benju/tasks/data/usecase/GetTasksUseCaseImpl.kt Updates use case implementation for KMP repository + dispatchers.
data/src/commonMain/kotlin/fr/benju/tasks/data/usecase/GetTaskByIdUseCaseImpl.kt Updates use case implementation for KMP repository.
data/src/commonMain/kotlin/fr/benju/tasks/data/usecase/GetDarkModeUseCaseImpl.kt Updates use case implementation for KMP repository.
data/src/commonMain/kotlin/fr/benju/tasks/data/usecase/DeleteTaskUseCaseImpl.kt Updates use case implementation for KMP repository + dispatchers.
data/src/commonMain/kotlin/fr/benju/tasks/data/usecase/AddTaskUseCaseImpl.kt Updates use case implementation for KMP repository + dispatchers.
data/src/commonMain/kotlin/fr/benju/tasks/data/repository/UserPreferencesRepositoryImpl.kt Adds multiplatform-settings based implementation.
data/src/commonMain/kotlin/fr/benju/tasks/data/repository/TaskRepositoryImpl.kt Adds SQLDelight-based repository implementation.
data/src/commonMain/kotlin/fr/benju/tasks/data/preferences/SettingsFactory.kt Adds expect settings factory for multiplatform.
data/src/commonMain/kotlin/fr/benju/tasks/data/mapper/TaskMapper.kt Adapts mapper to SQLDelight-generated entity type.
data/src/commonMain/kotlin/fr/benju/tasks/data/di/DataModule.kt Adds Koin dataModule providing drivers, repositories, use cases.
data/src/commonMain/kotlin/fr/benju/tasks/data/database/DatabaseDriverFactory.kt Adds expect driver factory for multiplatform.
data/src/androidMain/kotlin/fr/benju/tasks/data/preferences/SettingsFactory.kt Adds Android settings factory (SharedPreferences).
data/src/androidMain/kotlin/fr/benju/tasks/data/database/DatabaseDriverFactory.kt Adds Android SQLDelight driver factory.
data/src/androidMain/AndroidManifest.xml Adds minimal manifest for KMP Android source set.
data/build.gradle.kts Converts data module to KMP and configures SQLDelight.
core/src/commonMain/kotlin/fr/benju/tasks/core/test/TaskTestFactory.kt Updates test factory timestamps to kotlinx-datetime.
core/src/commonMain/kotlin/fr/benju/tasks/core/test/CoroutineTestExtension.kt Adds coroutine/JUnit test helper in shared sources.
core/src/commonMain/kotlin/fr/benju/tasks/core/dispatchers/ICoroutineDispatchers.kt Adds shared dispatcher abstraction for KMP.
core/src/commonMain/kotlin/fr/benju/tasks/core/dispatchers/CoroutineDispatchers.kt Adds default dispatcher provider.
core/build.gradle.kts Converts core module to KMP (JVM + iOS).
build.gradle.kts Registers new plugins (KMP, Compose MP, SQLDelight) in root build.
app/src/main/java/fr/benju/tasks/TaskManagerApp.kt Replaces Hilt with Koin startup + platform bindings for driver/settings factories.
app/src/main/java/fr/benju/tasks/MainActivity.kt Replaces Hilt ViewModel injection with Koin + keeps Compose navigation.
app/src/main/java/fr/benju/tasks/di/UserPreferencesModule.kt Removes Hilt DataStore module.
app/src/main/java/fr/benju/tasks/di/DatabaseModule.kt Removes Hilt Room module.
app/src/main/java/fr/benju/tasks/di/CoroutineModule.kt Removes Hilt dispatchers module.
app/src/main/java/fr/benju/tasks/di/AppModule.kt Removes Hilt repository bindings.
app/build.gradle.kts Removes Hilt/Room/DataStore deps and adds Koin + SQLDelight driver dependency.
Comments suppressed due to low confidence (2)

feature/taskeditor/src/commonMain/kotlin/fr/benju/tasks/feature/taskeditor/TaskEditorViewModel.kt:58

  • Error messages are now hard-coded English strings in the ViewModel, which bypasses the new Compose Multiplatform string resources and breaks localization. Consider keeping a resource-backed representation in state (e.g., Res.string.* / StringResource, or a sealed UiText type) and resolving it with stringResource(...) in the UI.
    feature/taskeditor/src/commonMain/kotlin/fr/benju/tasks/feature/taskeditor/TaskEditorViewModel.kt:86
  • On save failure, the ViewModel sets a hard-coded English error string. This bypasses the shared localized resources in ui/composeResources and makes i18n inconsistent across platforms. Prefer emitting a resource-backed error (or domain error type) and mapping to Res.string.* in the UI.

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

Comment on lines +31 to +35

// Lifecycle ViewModel
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.lifecycle.runtime.compose)

Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

commonMain depends on androidx.lifecycle:* artifacts (lifecycle-viewmodel-ktx, lifecycle-runtime-compose). These are Android-only coordinates; with jvm() + iOS targets enabled, dependency resolution/compilation will fail for non-Android targets. Use the multiplatform lifecycle artifacts (e.g., JetBrains org.jetbrains.androidx.lifecycle:*) or move lifecycle-dependent code/deps into platform-specific source sets.

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +34

// Lifecycle ViewModel
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.lifecycle.runtime.compose)

Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

commonMain depends on androidx.lifecycle:* artifacts (lifecycle-viewmodel-ktx, lifecycle-runtime-compose). These are Android-only coordinates; with jvm() + iOS targets enabled, dependency resolution/compilation will fail for non-Android targets. Use the multiplatform lifecycle artifacts (e.g., JetBrains org.jetbrains.androidx.lifecycle:*) or move lifecycle-dependent code/deps into platform-specific source sets.

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +35

// Lifecycle ViewModel
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.lifecycle.runtime.compose)

Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

commonMain depends on androidx.lifecycle:* artifacts (lifecycle-viewmodel-ktx, lifecycle-runtime-compose). These are Android-only coordinates; with jvm() + iOS targets enabled, dependency resolution/compilation will fail for non-Android targets. Use the multiplatform lifecycle artifacts (e.g., JetBrains org.jetbrains.androidx.lifecycle:*) or move lifecycle-dependent code/deps into platform-specific source sets.

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +31
implementation(libs.sqldelight.sqlite.driver)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.lifecycle.runtime.compose)
}
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

desktopApp depends on androidx.navigation:navigation-compose and androidx.lifecycle:* artifacts, which are Android-only and typically won’t resolve/work for a Compose Desktop JVM target. Switch to multiplatform equivalents (e.g., JetBrains/Compose Multiplatform navigation + lifecycle artifacts) or a desktop-specific navigation approach.

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +49
commonTest.dependencies {
implementation(libs.junit.jupiter.api)
implementation(libs.mockk)
implementation(libs.kluent)
implementation(libs.turbine)
implementation(libs.kotlinx.coroutines.test)
implementation(project(":core"))
}
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

This module still has JUnit Jupiter tests under src/test (e.g., TaskListViewModelTest imports org.junit.jupiter.api.Test), but the build script no longer configures JUnit Platform execution and only declares junit-jupiter-api (no engine/launcher). Add the JUnit Jupiter engine (and launcher if needed) to the relevant test runtime and ensure the corresponding Test tasks run with useJUnitPlatform(), otherwise tests may not execute in CI.

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +48
commonTest.dependencies {
implementation(libs.junit.jupiter.api)
implementation(libs.mockk)
implementation(libs.kluent)
implementation(libs.turbine)
implementation(libs.kotlinx.coroutines.test)
implementation(project(":core"))
}
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

This module still has JUnit Jupiter tests under src/test (e.g., TaskEditorViewModelTest imports org.junit.jupiter.api.Test), but the build script only declares junit-jupiter-api and doesn’t configure JUnit Platform execution / runtime engine. Add the JUnit Jupiter engine (and launcher if needed) to the relevant test runtime and ensure the corresponding Test tasks run with useJUnitPlatform(), otherwise tests may not execute.

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +49
commonTest.dependencies {
implementation(libs.junit.jupiter.api)
implementation(libs.mockk)
implementation(libs.kluent)
implementation(libs.turbine)
implementation(libs.kotlinx.coroutines.test)
implementation(project(":core"))
}
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

This module still has JUnit Jupiter tests under src/test (e.g., SettingsViewModelTest imports org.junit.jupiter.api.Test), but the build script only declares junit-jupiter-api and doesn’t configure JUnit Platform execution / runtime engine. Add the JUnit Jupiter engine (and launcher if needed) to the relevant test runtime and ensure the corresponding Test tasks run with useJUnitPlatform(), otherwise tests may not execute.

Copilot uses AI. Check for mistakes.
Comment thread ui/build.gradle.kts
Comment on lines +40 to 44
compose.resources {
publicResClass = true
packageOfResClass = "fr.benju.tasks.ui"
generateResClass = always
}
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

generateResClass = always is an unqualified identifier in this Gradle Kotlin DSL file, and there’s no import/definition of always in the script. This will likely fail to compile the build script. Use the proper enum/value reference expected by the Compose Resources DSL (e.g., GenerateResClass.Always / GenerateResClass.always depending on the API) or add the required import.

Copilot uses AI. Check for mistakes.
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.

3 participants