diff --git a/android/build.gradle.kts b/android/build.gradle.kts
new file mode 100644
index 00000000..6f3baad1
--- /dev/null
+++ b/android/build.gradle.kts
@@ -0,0 +1,96 @@
+import org.jetbrains.compose.compose
+
+plugins {
+ kotlin("android")
+ id("com.android.application")
+ id("org.jetbrains.compose")
+ id("com.google.devtools.ksp")
+ id("org.jmailen.kotlinter")
+}
+
+dependencies {
+ implementation(projects.core)
+ implementation(projects.i18n)
+ implementation(projects.data)
+ implementation(projects.uiCore)
+ implementation(projects.presentation)
+
+ // UI (Compose)
+ implementation(libs.voyagerCore)
+ implementation(libs.voyagerNavigation)
+ implementation(libs.voyagerTransitions)
+ implementation(libs.accompanistPager)
+ implementation(libs.accompanistFlowLayout)
+ implementation(libs.kamel)
+ implementation(libs.materialDialogsCore)
+
+ // Android
+ implementation(libs.appCompat)
+ implementation(libs.activityCompose)
+
+ // Android Lifecycle
+ implementation(libs.lifecycleCommon)
+ implementation(libs.lifecycleProcess)
+ implementation(libs.lifecycleRuntime)
+
+ // Threading
+ implementation(libs.coroutinesCore)
+ implementation(libs.coroutinesAndroid)
+
+ // Json
+ implementation(libs.json)
+
+ // Xml
+ implementation(libs.xmlUtilCore)
+ implementation(libs.xmlUtilSerialization)
+
+ // Dependency Injection
+ implementation(libs.kotlinInjectRuntime)
+ ksp(libs.kotlinInjectCompiler)
+
+ // Http client
+ implementation(libs.ktorCore)
+ implementation(libs.ktorOkHttp)
+ implementation(libs.ktorSerialization)
+ implementation(libs.ktorLogging)
+ implementation(libs.ktorWebsockets)
+ implementation(libs.ktorAuth)
+
+ // Logging
+ implementation(libs.slf4jApi)
+ implementation(libs.slf4jAndroid)
+ implementation(libs.ktlogging)
+
+ // Storage
+ implementation(libs.okio)
+
+ // Preferences
+ implementation(libs.multiplatformSettingsCore)
+ implementation(libs.multiplatformSettingsSerialization)
+ implementation(libs.multiplatformSettingsCoroutines)
+
+ // Utility
+ implementation(libs.krokiCoroutines)
+
+ // Localization
+ implementation(libs.mokoCore)
+ implementation(libs.mokoCompose)
+
+ // Testing
+ testImplementation(kotlin("test-junit"))
+ testImplementation(compose("org.jetbrains.compose.ui:ui-test-junit4"))
+ testImplementation(libs.coroutinesTest)
+}
+
+android {
+ defaultConfig {
+ applicationId = "ca.gosyer.tachidesk.jui.android"
+ versionCode = 1
+ versionName = version.toString()
+ }
+ buildTypes {
+ getByName("release") {
+ isMinifyEnabled = false
+ }
+ }
+}
\ No newline at end of file
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..9c48a7e8
--- /dev/null
+++ b/android/src/main/AndroidManifest.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/src/main/java/ca/gosyer/jui/android/App.kt b/android/src/main/java/ca/gosyer/jui/android/App.kt
new file mode 100644
index 00000000..9fe213b8
--- /dev/null
+++ b/android/src/main/java/ca/gosyer/jui/android/App.kt
@@ -0,0 +1,44 @@
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+package ca.gosyer.jui.android
+
+import android.app.Application
+import androidx.appcompat.app.AppCompatDelegate
+import androidx.lifecycle.DefaultLifecycleObserver
+import androidx.lifecycle.ProcessLifecycleOwner
+import androidx.lifecycle.lifecycleScope
+import ca.gosyer.core.prefs.getAsFlow
+import ca.gosyer.data.ui.model.ThemeMode
+import ca.gosyer.ui.AppComponent
+import kotlinx.coroutines.flow.launchIn
+
+class App : Application(), DefaultLifecycleObserver {
+
+ override fun onCreate() {
+ super.onCreate()
+
+ /*if (BuildConfig.DEBUG) {
+ System.setProperty("kotlinx.coroutines.debug", "on")
+ }*/
+
+ ProcessLifecycleOwner.get().lifecycle.addObserver(this)
+
+ val appComponent = AppComponent.getInstance(this)
+ appComponent.dataComponent.uiPreferences.themeMode()
+ .getAsFlow {
+ AppCompatDelegate.setDefaultNightMode(
+ when (it) {
+ ThemeMode.System -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
+ ThemeMode.Light -> AppCompatDelegate.MODE_NIGHT_NO
+ ThemeMode.Dark -> AppCompatDelegate.MODE_NIGHT_YES
+ }
+ )
+ }
+ .launchIn(ProcessLifecycleOwner.get().lifecycleScope)
+
+ }
+}
\ No newline at end of file
diff --git a/android/src/main/java/ca/gosyer/jui/android/MainActivity.kt b/android/src/main/java/ca/gosyer/jui/android/MainActivity.kt
new file mode 100644
index 00000000..b0053c0e
--- /dev/null
+++ b/android/src/main/java/ca/gosyer/jui/android/MainActivity.kt
@@ -0,0 +1,28 @@
+package ca.gosyer.jui.android
+
+import android.os.Bundle
+import androidx.activity.compose.setContent
+import androidx.appcompat.app.AppCompatActivity
+import androidx.compose.runtime.CompositionLocalProvider
+import ca.gosyer.ui.AppComponent
+import ca.gosyer.ui.base.theme.AppTheme
+import ca.gosyer.ui.main.MainMenu
+
+class MainActivity : AppCompatActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ val appComponent = AppComponent.getInstance(applicationContext)
+ if (savedInstanceState == null) {
+ appComponent.dataComponent.migrations.runMigrations()
+ }
+ val uiHooks = appComponent.uiComponent.getHooks()
+ setContent {
+ CompositionLocalProvider(*uiHooks) {
+ AppTheme {
+ MainMenu()
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/android/src/main/res/uk/uuid/slf4j/android/config.properties b/android/src/main/res/uk/uuid/slf4j/android/config.properties
new file mode 100644
index 00000000..abb8973f
--- /dev/null
+++ b/android/src/main/res/uk/uuid/slf4j/android/config.properties
@@ -0,0 +1,9 @@
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at https://mozilla.org/MPL/2.0/.
+#
+
+showThread=true
+showName=short
+level.logger-prefix=SUPPRESS|ERROR|WARN|INFO|DEBUG|VERBOSE|NATIVE
\ No newline at end of file
diff --git a/android/src/main/res/xml/network_security_config.xml b/android/src/main/res/xml/network_security_config.xml
new file mode 100644
index 00000000..a3709d3f
--- /dev/null
+++ b/android/src/main/res/xml/network_security_config.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build.gradle.kts b/build.gradle.kts
index 6a500d26..427c37bd 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -133,11 +133,26 @@ subprojects {
plugins.withType {
configure {
if (!Config.androidDev) {
- sourceSets.addSrcDir("desktopMain", "jvmMain")
- sourceSets.addSrcDir("desktopTest", "jvmTest")
+ sourceSets.addSrcDir("desktopMain", "src/jvmMain/kotlin")
+ sourceSets.addSrcDir("desktopTest", "src/jvmTest/kotlin")
+ }
+ sourceSets.addSrcDir("androidMain", "src/jvmMain/kotlin")
+ sourceSets.addSrcDir("androidTest", "src/jvmTest/kotlin")
+ plugins.withType {
+ sourceSets.addSrcDir("commonMain", "build/generated/ksp/commonMain/kotlin")
+ sourceSets.addSrcDir("commonTest", "build/generated/ksp/commonTest/kotlin")
+
+ sourceSets.addSrcDir("desktopMain", "build/generated/ksp/desktopMain/kotlin")
+ sourceSets.addSrcDir("desktopTest", "build/generated/ksp/desktopTest/kotlin")
+
+ if (gradle.startParameter.taskRequests.toString().contains("Release")) {
+ sourceSets.addSrcDir("androidMain", "build/generated/ksp/androidRelease/kotlin")
+ sourceSets.addSrcDir("androidTest", "build/generated/ksp/androidRelease/kotlin")
+ } else {
+ sourceSets.addSrcDir("androidMain", "build/generated/ksp/androidDebug/kotlin")
+ sourceSets.addSrcDir("androidTest", "build/generated/ksp/androidDebug/kotlin")
+ }
}
- sourceSets.addSrcDir("androidMain", "jvmMain")
- sourceSets.addSrcDir("androidTest", "jvmTest")
}
}
}
@@ -146,7 +161,7 @@ subprojects {
fun NamedDomainObjectContainer.addSrcDir(configuration: String, srcDir: String) {
filter { it.name.contains(configuration) }
.forEach {
- it.kotlin.srcDir("src/$srcDir/kotlin")
+ it.kotlin.srcDir(srcDir)
}
}
diff --git a/buildSrc/src/main/kotlin/Config.kt b/buildSrc/src/main/kotlin/Config.kt
index f2637049..6d5e4907 100644
--- a/buildSrc/src/main/kotlin/Config.kt
+++ b/buildSrc/src/main/kotlin/Config.kt
@@ -13,5 +13,5 @@ object Config {
val desktopJvmTarget = JavaVersion.VERSION_16
val androidJvmTarget = JavaVersion.VERSION_11
- const val androidDev = false
+ const val androidDev = true
}
\ No newline at end of file
diff --git a/core/build.gradle.kts b/core/build.gradle.kts
index c7bc6e58..b70ddf63 100644
--- a/core/build.gradle.kts
+++ b/core/build.gradle.kts
@@ -39,7 +39,6 @@ kotlin {
}
}
val commonMain by getting {
- kotlin.srcDir("build/generated/ksp/commonMain/kotlin")
dependencies {
api(kotlin("stdlib-common"))
api(libs.coroutinesCore)
@@ -55,7 +54,6 @@ kotlin {
}
}
val commonTest by getting {
- kotlin.srcDir("build/generated/ksp/commonTest/kotlin")
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
@@ -63,24 +61,20 @@ kotlin {
}
val desktopMain by getting {
- kotlin.srcDir("build/generated/ksp/desktopMain/kotlin")
dependencies {
api(kotlin("stdlib-jdk8"))
api(libs.appDirs)
}
}
val desktopTest by getting {
- kotlin.srcDir("build/generated/ksp/desktopTest/kotlin")
}
val androidMain by getting {
- kotlin.srcDir("build/generated/ksp/androidRelease/kotlin")
dependencies {
api(kotlin("stdlib-jdk8"))
}
}
val androidTest by getting {
- kotlin.srcDir("build/generated/ksp/androidReleaseTest/kotlin")
}
}
}
diff --git a/core/src/androidMain/kotlin/ca/gosyer/core/prefs/PreferenceStoreFactory.kt b/core/src/androidMain/kotlin/ca/gosyer/core/prefs/PreferenceStoreFactory.kt
index b849bf25..d5f33bcc 100644
--- a/core/src/androidMain/kotlin/ca/gosyer/core/prefs/PreferenceStoreFactory.kt
+++ b/core/src/androidMain/kotlin/ca/gosyer/core/prefs/PreferenceStoreFactory.kt
@@ -14,7 +14,7 @@ actual class PreferenceStoreFactory @Inject constructor(private val context: Con
actual fun create(vararg names: String): PreferenceStore {
return AndroidPreferenceStore(
AndroidSettings(
- context.getSharedPreferences(names.joinToString(separator = "/"), Context.MODE_PRIVATE)
+ context.getSharedPreferences(names.joinToString(separator = "_"), Context.MODE_PRIVATE)
)
)
}
diff --git a/data/build.gradle.kts b/data/build.gradle.kts
index bf286b10..b3916492 100644
--- a/data/build.gradle.kts
+++ b/data/build.gradle.kts
@@ -31,7 +31,6 @@ kotlin {
}
}
val commonMain by getting {
- kotlin.srcDir("build/generated/ksp/commonMain/kotlin")
dependencies {
api(kotlin("stdlib-common"))
api(libs.coroutinesCore)
@@ -49,7 +48,6 @@ kotlin {
}
}
val commonTest by getting {
- kotlin.srcDir("build/generated/ksp/commonTest/kotlin")
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
@@ -57,23 +55,19 @@ kotlin {
}
val desktopMain by getting {
- kotlin.srcDir("build/generated/ksp/desktopMain/kotlin")
dependencies {
api(kotlin("stdlib-jdk8"))
}
}
val desktopTest by getting {
- kotlin.srcDir("build/generated/ksp/desktopTest/kotlin")
}
val androidMain by getting {
- kotlin.srcDir("build/generated/ksp/androidRelease/kotlin")
dependencies {
api(kotlin("stdlib-jdk8"))
}
}
val androidTest by getting {
- kotlin.srcDir("build/generated/ksp/androidReleaseTest/kotlin")
}
}
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index bb813b78..fd474ec9 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -14,8 +14,12 @@ kamel = "0.3.0"
materialDialogs = "0.6.4"
# Android
+appCompat = "1.4.1"
activityCompose = "1.3.1"
+# Android Lifecycle
+lifecycle = "2.4.1"
+
# Swing
darklaf = "2.7.3"
@@ -27,6 +31,7 @@ ktor = "1.6.7"
# Logging
slf4j = "1.7.35"
+slf4jAndroid = "1.7.35-0"
log4j = "2.17.1"
ktlogging = "2.1.21"
@@ -48,6 +53,7 @@ moko = "0.18.0"
# Kotlin
coroutinesCore = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
coroutinesSwing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
+coroutinesAndroid = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
coroutinesTest = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
# Serialization
@@ -65,8 +71,14 @@ kamel = { module = "com.alialbaali.kamel:kamel-image", version.ref = "kamel" }
materialDialogsCore = { module = "ca.gosyer:compose-material-dialogs-core", version.ref = "materialDialogs" }
# Android
+appCompat = { module = "androidx.appcompat:appcompat", version.ref = "appCompat" }
activityCompose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
+# Android Lifecycle
+lifecycleCommon = { module = "androidx.lifecycle:lifecycle-common", version.ref = "lifecycle" }
+lifecycleProcess = { module = "androidx.lifecycle:lifecycle-process", version.ref = "lifecycle" }
+lifecycleRuntime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" }
+
# Swing
darklaf = { module = "com.github.weisj:darklaf-core", version.ref = "darklaf" }
@@ -85,6 +97,7 @@ ktorAuth = { module = "io.ktor:ktor-client-auth", version.ref = "ktor" }
# Logging
slf4jApi = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
slf4jJul = { module = "org.slf4j:jul-to-slf4j", version.ref = "slf4j" }
+slf4jAndroid = { module = "uk.uuid.slf4j:slf4j-android", version.ref = "slf4jAndroid" }
log4jApi = { module = "org.apache.logging.log4j:log4j-api", version.ref = "log4j" }
log4jCore = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" }
log4jSlf4j = { module = "org.apache.logging.log4j:log4j-slf4j-impl", version.ref = "log4j" }
diff --git a/presentation/build.gradle.kts b/presentation/build.gradle.kts
index a5b12650..47bcd314 100644
--- a/presentation/build.gradle.kts
+++ b/presentation/build.gradle.kts
@@ -38,7 +38,6 @@ kotlin {
}
}
val commonMain by getting {
- kotlin.srcDir("build/generated/ksp/commonMain/kotlin")
dependencies {
api(kotlin("stdlib-common"))
api(libs.coroutinesCore)
@@ -60,7 +59,6 @@ kotlin {
}
}
val commonTest by getting {
- kotlin.srcDir("build/generated/ksp/commonTest/kotlin")
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
@@ -68,25 +66,21 @@ kotlin {
}
val desktopMain by getting {
- kotlin.srcDir("build/generated/ksp/desktopMain/kotlin")
dependencies {
api(kotlin("stdlib-jdk8"))
api(libs.coroutinesSwing)
}
}
val desktopTest by getting {
- kotlin.srcDir("build/generated/ksp/desktopTest/kotlin")
}
val androidMain by getting {
- kotlin.srcDir("build/generated/ksp/androidRelease/kotlin")
dependencies {
api(kotlin("stdlib-jdk8"))
api(libs.activityCompose)
}
}
val androidTest by getting {
- kotlin.srcDir("build/generated/ksp/androidReleaseTest/kotlin")
}
}
}
diff --git a/presentation/src/androidMain/kotlin/ca/gosyer/ui/base/vm/ViewModelFactory.kt b/presentation/src/androidMain/kotlin/ca/gosyer/ui/base/vm/ViewModelFactory.kt
index d1923647..c1f262f1 100644
--- a/presentation/src/androidMain/kotlin/ca/gosyer/ui/base/vm/ViewModelFactory.kt
+++ b/presentation/src/androidMain/kotlin/ca/gosyer/ui/base/vm/ViewModelFactory.kt
@@ -7,6 +7,27 @@
package ca.gosyer.ui.base.vm
import ca.gosyer.ui.base.theme.AppThemeViewModel
+import ca.gosyer.ui.categories.CategoriesScreenViewModel
+import ca.gosyer.ui.downloads.DownloadsScreenViewModel
+import ca.gosyer.ui.extensions.ExtensionsScreenViewModel
+import ca.gosyer.ui.library.LibraryScreenViewModel
+import ca.gosyer.ui.main.MainViewModel
+import ca.gosyer.ui.main.components.DebugOverlayViewModel
+import ca.gosyer.ui.manga.MangaScreenViewModel
+import ca.gosyer.ui.reader.ReaderMenuViewModel
+import ca.gosyer.ui.settings.SettingsAdvancedViewModel
+import ca.gosyer.ui.settings.SettingsBackupViewModel
+import ca.gosyer.ui.settings.SettingsGeneralViewModel
+import ca.gosyer.ui.settings.SettingsLibraryViewModel
+import ca.gosyer.ui.settings.SettingsReaderViewModel
+import ca.gosyer.ui.settings.SettingsServerHostViewModel
+import ca.gosyer.ui.settings.SettingsServerViewModel
+import ca.gosyer.ui.settings.ThemesViewModel
+import ca.gosyer.ui.sources.SourcesScreenViewModel
+import ca.gosyer.ui.sources.browse.SourceScreenViewModel
+import ca.gosyer.ui.sources.browse.filter.SourceFiltersViewModel
+import ca.gosyer.ui.sources.home.SourceHomeScreenViewModel
+import ca.gosyer.ui.sources.settings.SourceSettingsScreenViewModel
import ca.gosyer.ui.updates.UpdatesScreenViewModel
import ca.gosyer.uicore.vm.ViewModel
import ca.gosyer.uicore.vm.ViewModelFactory
@@ -16,6 +37,27 @@ import kotlin.reflect.KClass
@Inject
actual class ViewModelFactoryImpl(
private val appThemeFactory: () -> AppThemeViewModel,
+ private val categoryFactory: () -> CategoriesScreenViewModel,
+ private val downloadsFactory: (Boolean) -> DownloadsScreenViewModel,
+ private val extensionsFactory: () -> ExtensionsScreenViewModel,
+ private val libraryFactory: () -> LibraryScreenViewModel,
+ private val debugOverlayFactory: () -> DebugOverlayViewModel,
+ private val mainFactory: () -> MainViewModel,
+ private val mangaFactory: (params: MangaScreenViewModel.Params) -> MangaScreenViewModel,
+ private val readerFactory: (params: ReaderMenuViewModel.Params) -> ReaderMenuViewModel,
+ private val settingsAdvancedFactory: () -> SettingsAdvancedViewModel,
+ private val themesFactory: () -> ThemesViewModel,
+ private val settingsBackupFactory: () -> SettingsBackupViewModel,
+ private val settingsGeneralFactory: () -> SettingsGeneralViewModel,
+ private val settingsLibraryFactory: () -> SettingsLibraryViewModel,
+ private val settingsReaderFactory: () -> SettingsReaderViewModel,
+ private val settingsServerFactory: () -> SettingsServerViewModel,
+ private val settingsServerHostFactory: () -> SettingsServerHostViewModel,
+ private val sourceFiltersFactory: (params: SourceFiltersViewModel.Params) -> SourceFiltersViewModel,
+ private val sourceSettingsFactory: (params: SourceSettingsScreenViewModel.Params) -> SourceSettingsScreenViewModel,
+ private val sourceHomeFactory: () -> SourceHomeScreenViewModel,
+ private val sourceFactory: (params: SourceScreenViewModel.Params) -> SourceScreenViewModel,
+ private val sourcesFactory: () -> SourcesScreenViewModel,
private val updatesFactory: () -> UpdatesScreenViewModel
) : ViewModelFactory() {
@@ -23,6 +65,27 @@ actual class ViewModelFactoryImpl(
@Suppress("UNCHECKED_CAST", "IMPLICIT_CAST_TO_ANY")
return when (klass) {
AppThemeViewModel::class -> appThemeFactory()
+ CategoriesScreenViewModel::class -> categoryFactory()
+ DownloadsScreenViewModel::class -> downloadsFactory(arg1 as Boolean)
+ ExtensionsScreenViewModel::class -> extensionsFactory()
+ LibraryScreenViewModel::class -> libraryFactory()
+ DebugOverlayViewModel::class -> debugOverlayFactory()
+ MainViewModel::class -> mainFactory()
+ MangaScreenViewModel::class -> mangaFactory(arg1 as MangaScreenViewModel.Params)
+ ReaderMenuViewModel::class -> readerFactory(arg1 as ReaderMenuViewModel.Params)
+ SettingsAdvancedViewModel::class -> settingsAdvancedFactory()
+ ThemesViewModel::class -> themesFactory()
+ SettingsBackupViewModel::class -> settingsBackupFactory()
+ SettingsGeneralViewModel::class -> settingsGeneralFactory()
+ SettingsLibraryViewModel::class -> settingsLibraryFactory()
+ SettingsReaderViewModel::class -> settingsReaderFactory()
+ SettingsServerViewModel::class -> settingsServerFactory()
+ SettingsServerHostViewModel::class -> settingsServerHostFactory()
+ SourceFiltersViewModel::class -> sourceFiltersFactory(arg1 as SourceFiltersViewModel.Params)
+ SourceSettingsScreenViewModel::class -> sourceSettingsFactory(arg1 as SourceSettingsScreenViewModel.Params)
+ SourceHomeScreenViewModel::class -> sourceHomeFactory()
+ SourceScreenViewModel::class -> sourceFactory(arg1 as SourceScreenViewModel.Params)
+ SourcesScreenViewModel::class -> sourcesFactory()
UpdatesScreenViewModel::class -> updatesFactory()
else -> throw IllegalArgumentException("Unknown ViewModel $klass")
} as VM
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 0c9d2e32..19f6a66a 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -15,6 +15,7 @@ include("i18n")
include("data")
include("ui-core")
include("presentation")
+include("android")
enableFeaturePreview("VERSION_CATALOGS")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
diff --git a/ui-core/build.gradle.kts b/ui-core/build.gradle.kts
index 7b98cda6..2982781f 100644
--- a/ui-core/build.gradle.kts
+++ b/ui-core/build.gradle.kts
@@ -32,7 +32,6 @@ kotlin {
}
}
val commonMain by getting {
- kotlin.srcDir("build/generated/ksp/commonMain/kotlin")
dependencies {
api(kotlin("stdlib-common"))
api(libs.coroutinesCore)
@@ -45,7 +44,6 @@ kotlin {
}
}
val commonTest by getting {
- kotlin.srcDir("build/generated/ksp/commonTest/kotlin")
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
@@ -53,24 +51,19 @@ kotlin {
}
val desktopMain by getting {
- kotlin.srcDir("build/generated/ksp/desktopMain/kotlin")
dependencies {
api(kotlin("stdlib-jdk8"))
- api(libs.coroutinesSwing)
}
}
val desktopTest by getting {
- kotlin.srcDir("build/generated/ksp/desktopTest/kotlin")
}
val androidMain by getting {
- kotlin.srcDir("build/generated/ksp/androidRelease/kotlin")
dependencies {
api(kotlin("stdlib-jdk8"))
}
}
val androidTest by getting {
- kotlin.srcDir("build/generated/ksp/androidReleaseTest/kotlin")
}
}
}