Skip to content

Commit

Permalink
Update to Kotlin 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
atomgomba committed May 24, 2024
1 parent 4116400 commit fee956f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 44 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ captures
.externalNativeBuild
.cxx
local.properties
xcuserdata
xcuserdata
.kotlin
13 changes: 1 addition & 12 deletions base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,10 @@ plugins {
kotlin {
applyDefaultHierarchyTemplate()

jvm {
compilations.all {
kotlinOptions {
jvmTarget = ProjectDefaults.javaVersion.toString()
}
}
}
jvm()

androidTarget {
publishLibraryVariants("release", "debug")
compilations.all {
kotlinOptions {
jvmTarget = ProjectDefaults.javaVersion.toString()
}
}
}

linuxX64()
Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
plugins {
// trick: for the same plugin versions in all sub-modules
alias(libs.plugins.androidLibrary).apply(false)
alias(libs.plugins.compose.compiler).apply(false)
alias(libs.plugins.composeMultiplatform).apply(false)
alias(libs.plugins.kotlinMultiplatform).apply(false)
}

allprojects {
group = "com.ekezet.hurok"
version = "1.0.0"
version = "1.0.1"
}
14 changes: 2 additions & 12 deletions compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,17 @@ plugins {
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.compose.compiler)
id("module.publication")
}

kotlin {
applyDefaultHierarchyTemplate()

jvm {
compilations.all {
kotlinOptions {
jvmTarget = ProjectDefaults.javaVersion.toString()
}
}
}
jvm()

androidTarget {
publishLibraryVariants("release", "debug")
compilations.all {
kotlinOptions {
jvmTarget = ProjectDefaults.javaVersion.toString()
}
}
}

linuxX64()
Expand Down
11 changes: 5 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@
agp = "8.2.0"
android-compileSdk = "34"
android-minSdk = "24"
androidx-lifecycle = "2.7.0"
cmp = "1.6.2"
kotlin = "1.9.23"
kotlinx-coroutines = "1.8.0"
nexus-publish = "2.0.0-rc-1"
androidx-lifecycle = "2.8.0"
cmp = "1.6.10"
kotlin = "2.0.0"
kotlinx-coroutines = "1.8.1"

[libraries]
androidx-lifecycle-viewmodelCompose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
nexus-publish = { module = "io.github.gradle-nexus.publish-plugin:io.github.gradle-nexus.publish-plugin.gradle.plugin", version.ref = "nexus-publish" }

[plugins]
androidLibrary = { id = "com.android.library", version.ref = "agp" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
composeMultiplatform = { id = "org.jetbrains.compose", version.ref = "cmp" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
13 changes: 1 addition & 12 deletions test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,10 @@ plugins {
kotlin {
applyDefaultHierarchyTemplate()

jvm {
compilations.all {
kotlinOptions {
jvmTarget = ProjectDefaults.javaVersion.toString()
}
}
}
jvm()

androidTarget {
publishLibraryVariants("release", "debug")
compilations.all {
kotlinOptions {
jvmTarget = ProjectDefaults.javaVersion.toString()
}
}
}

linuxX64()
Expand Down

0 comments on commit fee956f

Please sign in to comment.