diff --git a/.gitignore b/.gitignore index 9963d32..38a2ae5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.iml +.kotlin .gradle **/build/ xcuserdata diff --git a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/AndroidBuildConfig.kt b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/AndroidBuildConfig.kt index 5370dc7..90580e1 100644 --- a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/AndroidBuildConfig.kt +++ b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/AndroidBuildConfig.kt @@ -1,10 +1,12 @@ package jfyoteau.noteapp.convention import org.gradle.api.JavaVersion +import org.jetbrains.kotlin.gradle.dsl.JvmTarget object AndroidBuildConfig { - const val compileSdkVersion = 34 - const val minSdkVersion = 29 - const val targetSdkVersion = 34 - val jvmTarget = JavaVersion.VERSION_17 + const val COMPILE_SDK_VERSION = 34 + const val MIN_SDK_VERSION = 29 + const val TARGET_SDK_VERSION = 34 + val jvmTarget = JvmTarget.JVM_17 + val javaVersion = JavaVersion.VERSION_17 } diff --git a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/AndroidComposeConfiguration.kt b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/AndroidComposeConfiguration.kt index 1668ca5..543e691 100644 --- a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/AndroidComposeConfiguration.kt +++ b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/AndroidComposeConfiguration.kt @@ -13,11 +13,6 @@ internal fun Project.configureAndroidCompose( compose = true } - composeOptions { - kotlinCompilerExtensionVersion = - libs.findVersion("androidx-compose-compiler").get().toString() - } - dependencies { val bom = libs.findLibrary("androidx-compose-bom").get() add("implementation", platform(bom)) diff --git a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/JetbrainsComposeConfiguration.kt b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/JetbrainsComposeConfiguration.kt index 823ccea..5559e80 100644 --- a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/JetbrainsComposeConfiguration.kt +++ b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/JetbrainsComposeConfiguration.kt @@ -10,9 +10,6 @@ internal fun Project.configureJetbrainsCompose( kotlinMultiplatformExtension: KotlinMultiplatformExtension ) { val composeExtension = extensions.getByType() - composeExtension.apply { - kotlinCompilerPlugin.set(libs.findVersion("jetbrains.compose.compiler").get().toString()) - } val compose = composeExtension.dependencies kotlinMultiplatformExtension.apply { diff --git a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/KotlinAndroidConfiguration.kt b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/KotlinAndroidConfiguration.kt index df56615..12fb3a5 100644 --- a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/KotlinAndroidConfiguration.kt +++ b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/KotlinAndroidConfiguration.kt @@ -17,7 +17,7 @@ internal fun Project.configureKotlinAndroid( val resFile = file("src/androidMain/res") commonExtension.apply { - compileSdk = AndroidBuildConfig.compileSdkVersion + compileSdk = AndroidBuildConfig.COMPILE_SDK_VERSION if (androidManifestFile.exists()) { sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") @@ -27,14 +27,14 @@ internal fun Project.configureKotlinAndroid( } defaultConfig { - minSdk = AndroidBuildConfig.minSdkVersion + minSdk = AndroidBuildConfig.MIN_SDK_VERSION } compileOptions { // Up to Java 11 APIs are available through desugaring // https://developer.android.com/studio/write/java11-minimal-support-table - sourceCompatibility = AndroidBuildConfig.jvmTarget - targetCompatibility = AndroidBuildConfig.jvmTarget + sourceCompatibility = AndroidBuildConfig.javaVersion + targetCompatibility = AndroidBuildConfig.javaVersion isCoreLibraryDesugaringEnabled = true } buildTypes { diff --git a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/KotlinMultiplatformConfiguration.kt b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/KotlinMultiplatformConfiguration.kt index 48bf976..7520f7c 100644 --- a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/KotlinMultiplatformConfiguration.kt +++ b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/configuration/KotlinMultiplatformConfiguration.kt @@ -1,6 +1,7 @@ package jfyoteau.noteapp.convention.configuration import jfyoteau.noteapp.convention.AndroidBuildConfig +import org.gradle.jvm.toolchain.JavaLanguageVersion import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension @@ -9,6 +10,10 @@ internal fun configureKotlinMultiplatform( kotlinMultiplatformExtension: KotlinMultiplatformExtension ) { kotlinMultiplatformExtension.apply { + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of(AndroidBuildConfig.javaVersion.majorVersion)) + } + // https://kotlinlang.org/docs/multiplatform-expect-actual.html#expected-and-actual-classes // To suppress this warning about usage of expected and actual classes compilerOptions { @@ -17,10 +22,8 @@ internal fun configureKotlinMultiplatform( // Android androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = AndroidBuildConfig.jvmTarget.toString() - } + compilerOptions { + jvmTarget.set(AndroidBuildConfig.jvmTarget) } } diff --git a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/extensions/KotlinTarget.kt b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/extensions/KotlinTarget.kt index b69d085..d70cb5d 100644 --- a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/extensions/KotlinTarget.kt +++ b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/extensions/KotlinTarget.kt @@ -4,7 +4,7 @@ import jfyoteau.noteapp.convention.EnvParams import org.gradle.internal.os.OperatingSystem import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType import org.jetbrains.kotlin.gradle.plugin.KotlinTarget -import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinMultiplatformPlugin +import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinMetadataTarget private enum class HostType { MAC_OS, @@ -12,25 +12,25 @@ private enum class HostType { } private fun KotlinTarget.getHostType(): HostType? = - when (platformType) { - KotlinPlatformType.androidJvm, - KotlinPlatformType.jvm, - KotlinPlatformType.js, - KotlinPlatformType.wasm -> HostType.LINUX - - KotlinPlatformType.native -> - when { - name.startsWith("ios") -> HostType.MAC_OS - name.startsWith("watchos") -> HostType.MAC_OS - name.startsWith("linux") -> HostType.LINUX - else -> error("Unsupported native target: $this") - } - - KotlinPlatformType.common -> null - } + when (platformType) { + KotlinPlatformType.androidJvm, + KotlinPlatformType.jvm, + KotlinPlatformType.js, + KotlinPlatformType.wasm -> HostType.LINUX + + KotlinPlatformType.native -> + when { + name.startsWith("ios") -> HostType.MAC_OS + name.startsWith("watchos") -> HostType.MAC_OS + name.startsWith("linux") -> HostType.LINUX + else -> error("Unsupported native target: $this") + } + + KotlinPlatformType.common -> null + } private fun KotlinTarget.isCompilationAllowed(): Boolean { - if ((name == KotlinMultiplatformPlugin.METADATA_TARGET_NAME) || !EnvParams.splitTargets) { + if ((name == KotlinMetadataTarget.METADATA_TARGET_NAME) || !EnvParams.splitTargets) { return true } diff --git a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/plugin/JetbrainsComposeConventionPlugins.kt b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/plugin/JetbrainsComposeConventionPlugins.kt index 8203a24..526a964 100644 --- a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/plugin/JetbrainsComposeConventionPlugins.kt +++ b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/plugin/JetbrainsComposeConventionPlugins.kt @@ -14,6 +14,7 @@ class JetbrainsComposeConventionPlugins: Plugin { with(target) { with(pluginManager) { apply("org.jetbrains.compose") + apply("org.jetbrains.kotlin.plugin.compose") } if (!pluginManager.hasPlugin("org.jetbrains.kotlin.multiplatform")) { diff --git a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/plugin/KotlinMultiplatformApplicationConventionPlugin.kt b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/plugin/KotlinMultiplatformApplicationConventionPlugin.kt index 7c5c363..aadbd3d 100644 --- a/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/plugin/KotlinMultiplatformApplicationConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/jfyoteau/noteapp/convention/plugin/KotlinMultiplatformApplicationConventionPlugin.kt @@ -32,7 +32,7 @@ class KotlinMultiplatformApplicationConventionPlugin : Plugin { // Configure Android Application extensions.configure { configureKotlinAndroid(this) - defaultConfig.targetSdk = AndroidBuildConfig.targetSdkVersion + defaultConfig.targetSdk = AndroidBuildConfig.TARGET_SDK_VERSION } // Because task 'testClasses' does not exist, create it diff --git a/build.gradle.kts b/build.gradle.kts index 295829a..5499c80 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,12 +3,13 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask plugins { // this is necessary to avoid the plugins to be loaded multiple times // in each subproject's classloader - alias(libs.plugins.androidApplication) apply false - alias(libs.plugins.androidLibrary) apply false - alias(libs.plugins.jetbrainsCompose) apply false - alias(libs.plugins.kotlinMultiplatform) apply false - alias(libs.plugins.kotlinSerialization) apply false - alias(libs.plugins.gradleVersions) + alias(libs.plugins.android.application) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.jetbrains.compose) apply false + alias(libs.plugins.kotlin.multiplatform) apply false + alias(libs.plugins.kotlin.compose.compiler) apply false + alias(libs.plugins.kotlin.serialization) apply false + alias(libs.plugins.gradle.versions) } // ========================================================================================== diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 93c7f2e..1cbe306 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -5,7 +5,7 @@ import java.util.Properties plugins { alias(libs.plugins.convention.kmp.application) alias(libs.plugins.convention.jetbrainsCompose) - alias(libs.plugins.kotlinSerialization) + alias(libs.plugins.kotlin.serialization) } kotlin { @@ -31,9 +31,11 @@ kotlin { implementation(libs.decompose) } commonMain.dependencies { + implementation(projects.core.presentation) implementation(projects.feature.splash) implementation(projects.feature.note) implementation(libs.koin.core) + implementation(libs.koin.compose) implementation(libs.kotlinx.coroutines.core) implementation(libs.decompose) implementation(libs.decompose.extensions.compose) @@ -41,6 +43,8 @@ kotlin { desktopMain.dependencies { implementation(compose.desktop.currentOs) implementation(libs.kotlinx.coroutines.swing) + implementation(libs.slf4j.api) + implementation(libs.slf4j.reload4j) } } } @@ -87,10 +91,17 @@ compose.desktop { application { mainClass = "jfyoteau.noteapp.MainKt" + buildTypes.release { + proguard { + configurationFiles.from("compose-desktop.pro") + } + } + nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) packageName = "jfyoteau.noteapp" packageVersion = "1.0.0" + includeAllModules = true } } } diff --git a/composeApp/compose-desktop.pro b/composeApp/compose-desktop.pro new file mode 100644 index 0000000..279fe84 --- /dev/null +++ b/composeApp/compose-desktop.pro @@ -0,0 +1,14 @@ +# sl4j +-dontwarn javax.jms.** +-dontwarn javax.mail.** +-dontwarn com.sun.jdmk.comm.** + +# kotlinx.coroutines +-keep class kotlinx.coroutines.internal.MainDispatcherFactory { *; } +-keep class kotlinx.coroutines.swing.SwingDispatcherFactory { *; } + +# Decompose +-keep class com.arkivanov.decompose.extensions.compose.mainthread.SwingMainThreadChecker + +# sqlite +-keep class org.sqlite.** { *; } diff --git a/composeApp/src/commonMain/kotlin/jfyoteau/noteapp/presentation/screen/App.kt b/composeApp/src/commonMain/kotlin/jfyoteau/noteapp/presentation/screen/App.kt index e82c1f0..74a76da 100644 --- a/composeApp/src/commonMain/kotlin/jfyoteau/noteapp/presentation/screen/App.kt +++ b/composeApp/src/commonMain/kotlin/jfyoteau/noteapp/presentation/screen/App.kt @@ -4,11 +4,11 @@ import androidx.compose.foundation.gestures.Orientation import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue -import com.arkivanov.decompose.extensions.compose.jetbrains.stack.Children -import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.fade -import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.slide -import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.stackAnimation -import com.arkivanov.decompose.extensions.compose.jetbrains.subscribeAsState +import com.arkivanov.decompose.extensions.compose.stack.Children +import com.arkivanov.decompose.extensions.compose.stack.animation.fade +import com.arkivanov.decompose.extensions.compose.stack.animation.slide +import com.arkivanov.decompose.extensions.compose.stack.animation.stackAnimation +import com.arkivanov.decompose.extensions.compose.subscribeAsState import jfyoteau.noteapp.note.presentation.notedetail.screen.NoteDetailScreen import jfyoteau.noteapp.note.presentation.notelist.screen.NoteListScreen import jfyoteau.noteapp.presentation.state.AppState diff --git a/composeApp/src/commonMain/kotlin/jfyoteau/noteapp/presentation/state/AppState.kt b/composeApp/src/commonMain/kotlin/jfyoteau/noteapp/presentation/state/AppState.kt index 3d9bb6a..10c8eec 100644 --- a/composeApp/src/commonMain/kotlin/jfyoteau/noteapp/presentation/state/AppState.kt +++ b/composeApp/src/commonMain/kotlin/jfyoteau/noteapp/presentation/state/AppState.kt @@ -10,7 +10,9 @@ import jfyoteau.noteapp.splash.presentation.state.SplashState interface AppState { sealed interface Child { data class Splash(val state: SplashState) : Child + data class NoteList(val state: NoteListState) : Child + data class NoteDetail(val state: NoteDetailState, val isNew: Boolean) : Child } diff --git a/composeApp/src/desktopMain/kotlin/jfyoteau/noteapp/main.kt b/composeApp/src/desktopMain/kotlin/jfyoteau/noteapp/main.kt index 699f921..5595e6f 100644 --- a/composeApp/src/desktopMain/kotlin/jfyoteau/noteapp/main.kt +++ b/composeApp/src/desktopMain/kotlin/jfyoteau/noteapp/main.kt @@ -4,14 +4,12 @@ import androidx.compose.ui.window.Window import androidx.compose.ui.window.application import androidx.compose.ui.window.rememberWindowState import com.arkivanov.decompose.DefaultComponentContext -import com.arkivanov.decompose.ExperimentalDecomposeApi -import com.arkivanov.decompose.extensions.compose.jetbrains.lifecycle.LifecycleController +import com.arkivanov.decompose.extensions.compose.lifecycle.LifecycleController import com.arkivanov.essenty.lifecycle.LifecycleRegistry import jfyoteau.noteapp.di.GetAppState import jfyoteau.noteapp.di.initKoin import jfyoteau.noteapp.presentation.screen.App -@OptIn(ExperimentalDecomposeApi::class) fun main() { // Initialize Koin initKoin() diff --git a/composeApp/src/iosMain/kotlin/MainViewController.kt b/composeApp/src/iosMain/kotlin/MainViewController.kt index 977efc3..d2be877 100644 --- a/composeApp/src/iosMain/kotlin/MainViewController.kt +++ b/composeApp/src/iosMain/kotlin/MainViewController.kt @@ -2,7 +2,7 @@ import androidx.compose.runtime.remember import androidx.compose.ui.window.ComposeUIViewController import com.arkivanov.decompose.DefaultComponentContext import com.arkivanov.decompose.ExperimentalDecomposeApi -import com.arkivanov.decompose.lifecycle.ApplicationLifecycle +import com.arkivanov.essenty.lifecycle.ApplicationLifecycle import jfyoteau.noteapp.presentation.screen.App import jfyoteau.noteapp.di.GetAppState diff --git a/core/resources/build.gradle.kts b/core/resources/build.gradle.kts index 392d6c8..be1f17d 100644 --- a/core/resources/build.gradle.kts +++ b/core/resources/build.gradle.kts @@ -7,42 +7,6 @@ android { namespace = "jfyoteau.noteapp.core.resources" } -// fix for [https://github.com/JetBrains/compose-multiplatform/issues/4327] -// After executing the "generateComposeResClass" task, we replace the internal stuff by public. -tasks.named("generateComposeResClass") { - doLast { - val dirName = buildString { - val group = project.group.toString() - .lowercase() - .replace('.', '/') - .replace('-', '_') - append(group) - if (group.isNotEmpty()) { - append("/") - } - append(project.name.lowercase()) - } - val dir = project.layout.buildDirectory - .dir("generated/compose/resourceGenerator/kotlin/$dirName/generated/resources") - .get() - .asFile - File(dir, "Res.kt").also { - if (!it.exists()) { - return@also - } - val content = it.readText() - val updatedContent = content.replace("internal object Res {", "object Res {") - it.writeText(updatedContent) - } - listOf("Drawable0.kt", "String0.kt").forEach { filename -> - File(dir, filename).also { file -> - if (!file.exists()) { - return@also - } - val content = file.readText() - val updatedContent = content.replace("internal val Res", "val Res") - file.writeText(updatedContent) - } - } - } +compose.resources { + publicResClass = true } diff --git a/feature/note/src/commonMain/kotlin/jfyoteau/noteapp/note/presentation/notedetail/screen/NoteDetailScreen.kt b/feature/note/src/commonMain/kotlin/jfyoteau/noteapp/note/presentation/notedetail/screen/NoteDetailScreen.kt index 41e4ec9..236bcd9 100644 --- a/feature/note/src/commonMain/kotlin/jfyoteau/noteapp/note/presentation/notedetail/screen/NoteDetailScreen.kt +++ b/feature/note/src/commonMain/kotlin/jfyoteau/noteapp/note/presentation/notedetail/screen/NoteDetailScreen.kt @@ -39,7 +39,7 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.shadow import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import com.arkivanov.decompose.extensions.compose.jetbrains.subscribeAsState +import com.arkivanov.decompose.extensions.compose.subscribeAsState import jfyoteau.noteapp.note.domain.model.Note import jfyoteau.noteapp.note.presentation.notedetail.state.NoteDetailState import jfyoteau.noteapp.note.presentation.notedetail.state.NoteDetailUiEvent @@ -55,11 +55,10 @@ import noteapp.core.resources.generated.resources.icon_close import noteapp.core.resources.generated.resources.icon_save import noteapp.core.resources.generated.resources.note import noteapp.core.resources.generated.resources.save_note -import org.jetbrains.compose.resources.ExperimentalResourceApi import org.jetbrains.compose.resources.painterResource import org.jetbrains.compose.resources.stringResource -@OptIn(ExperimentalMaterial3Api::class, ExperimentalResourceApi::class) +@OptIn(ExperimentalMaterial3Api::class,) @Composable fun NoteDetailScreen(state: NoteDetailState) { val uiState by state.uiState.subscribeAsState() diff --git a/feature/note/src/commonMain/kotlin/jfyoteau/noteapp/note/presentation/notelist/screen/NoteListScreen.kt b/feature/note/src/commonMain/kotlin/jfyoteau/noteapp/note/presentation/notelist/screen/NoteListScreen.kt index ade2982..56fad3a 100644 --- a/feature/note/src/commonMain/kotlin/jfyoteau/noteapp/note/presentation/notelist/screen/NoteListScreen.kt +++ b/feature/note/src/commonMain/kotlin/jfyoteau/noteapp/note/presentation/notelist/screen/NoteListScreen.kt @@ -33,7 +33,7 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import com.arkivanov.decompose.extensions.compose.jetbrains.subscribeAsState +import com.arkivanov.decompose.extensions.compose.subscribeAsState import jfyoteau.noteapp.note.presentation.notelist.state.NoteListState import jfyoteau.noteapp.note.presentation.notelist.state.NoteListUiEvent import kotlinx.coroutines.flow.collectLatest @@ -44,12 +44,10 @@ import noteapp.core.resources.generated.resources.icon_sort import noteapp.core.resources.generated.resources.note_deleted import noteapp.core.resources.generated.resources.undo import noteapp.core.resources.generated.resources.your_note -import org.jetbrains.compose.resources.ExperimentalResourceApi import org.jetbrains.compose.resources.getString import org.jetbrains.compose.resources.painterResource import org.jetbrains.compose.resources.stringResource -@OptIn(ExperimentalResourceApi::class) @Composable fun NoteListScreen(state: NoteListState) { val uiState by state.uiState.subscribeAsState() diff --git a/gradle.properties b/gradle.properties index 90f9442..d3bd0fd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,6 +13,7 @@ android.nonTransitiveRClass=true android.useAndroidX=true # MPP +kotlin.mpp.androidGradlePluginCompatibility.nowarn=true kotlin.mpp.androidSourceSetLayoutVersion=2 kotlin.mpp.enableCInteropCommonization=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e8c8c16..288320a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,19 +1,19 @@ [versions] -agp = "8.3.1" -android-desugarJdkLibs = "2.0.4" -androidx-activityCompose = "1.8.2" -androidx-compose-bom = "2024.03.00" -androidx-compose-compiler = "1.5.11" -decompose = "2.2.2-compose-experimental" +agp = "8.6.0" +android-desugarJdkLibs = "2.1.2" +androidx-activityCompose = "1.9.2" +androidx-compose-bom = "2024.09.00" +decompose = "3.1.0" gradleVersions-plugin = "0.51.0" -jetbrains-compose-compiler = "1.5.10.1" -jetbrains-compose-plugin = "1.6.1" -koin = "3.5.3" -kotlin = "1.9.23" -kotlinx-coroutines = "1.8.0" -kotlinx-datetime = "0.5.0" -kotlinx-serialization = "1.6.3" -sqldelight = "2.0.1" +jetbrains-compose-plugin = "1.7.0-beta01" +koin = "4.0.0-RC2" +koin-compose = "4.0.0-RC2" +kotlin = "2.0.20" +kotlinx-coroutines = "1.9.0-RC.2" +kotlinx-datetime = "0.6.1" +kotlinx-serialization = "1.7.2" +slf4j = "2.0.16" +sqldelight = "2.0.2" [libraries] android-desugarJdkLibs = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "android-desugarJdkLibs" } @@ -22,14 +22,17 @@ androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", versi androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } decompose = { group = "com.arkivanov.decompose", name = "decompose", version.ref = "decompose" } -decompose-extensions-compose = { group = "com.arkivanov.decompose", name = "extensions-compose-jetbrains", version.ref = "decompose" } +decompose-extensions-compose = { group = "com.arkivanov.decompose", name = "extensions-compose", version.ref = "decompose" } koin-android = { group = "io.insert-koin", name = "koin-android", version.ref = "koin" } koin-core = { group = "io.insert-koin", name = "koin-core", version.ref = "koin" } +koin-compose = { group = "io.insert-koin", name = "koin-compose", version.ref = "koin-compose" } kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" } kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } kotlinx-coroutines-swing = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines" } kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinx-datetime" } kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinx-serialization" } +slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" } +slf4j-reload4j = { group = "org.slf4j", name = "slf4j-reload4j", version.ref = "slf4j" } sqldelight-coroutines = { group = "app.cash.sqldelight", name = "coroutines-extensions", version.ref = "sqldelight"} sqldelight-driver-android = { group = "app.cash.sqldelight", name = "android-driver", version.ref = "sqldelight" } sqldelight-driver-native = { group = "app.cash.sqldelight", name = "native-driver", version.ref = "sqldelight" } @@ -42,12 +45,13 @@ jetbrains-compose-gradlePlugin = { group = "org.jetbrains.compose", name = "comp kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" } [plugins] -androidApplication = { id = "com.android.application", version.ref = "agp" } -androidLibrary = { id = "com.android.library", version.ref = "agp" } -gradleVersions = { id = "com.github.ben-manes.versions", version.ref = "gradleVersions-plugin" } -jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "jetbrains-compose-plugin" } -kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } -kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +android-application = { id = "com.android.application", version.ref = "agp" } +android-library = { id = "com.android.library", version.ref = "agp" } +gradle-versions = { id = "com.github.ben-manes.versions", version.ref = "gradleVersions-plugin" } +jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "jetbrains-compose-plugin" } +kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" } # Plugins defined by this project diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2c1fc10..1163a22 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ -#Thu Feb 15 06:48:04 JST 2024 +#Sat Sep 07 09:28:03 JST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle.kts b/settings.gradle.kts index 95c79e3..0415dbd 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -11,6 +11,10 @@ pluginManagement { } } +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0") +} + dependencyResolutionManagement { @Suppress("UnstableApiUsage") repositories {