Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kotlin, KSP and Compose to v2 (major) #348

Merged
merged 5 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.gradle
.idea
.kotlin/
build/
.DS_Store
local.properties
17 changes: 6 additions & 11 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
id("com.android.application")
kotlin("multiplatform")
kotlin("plugin.compose")
id("org.jetbrains.compose")
id("com.google.devtools.ksp")
}

Expand Down Expand Up @@ -35,7 +37,8 @@ kotlin {
}

commonMain.dependencies {
api(libs.coroutines.core)
implementation(compose.runtime)
implementation(libs.coroutines.core)
implementation(libs.kable)
implementation(libs.khronicle)
}
Expand All @@ -44,19 +47,15 @@ kotlin {
implementation(libs.bundles.accompanist)
implementation(libs.bundles.compose)
implementation(libs.bundles.krayon)
implementation(libs.compose.material)
implementation(libs.exercise.annotations)
implementation(project.dependencies.platform(libs.compose.bom))
}
}
}

android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

compileSdk = libs.versions.android.compile.get().toInt()

defaultConfig {
minSdk = libs.versions.android.min.get().toInt()
targetSdk = libs.versions.android.target.get().toInt()
Expand All @@ -68,10 +67,6 @@ android {
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
}

lint {
abortOnError = false
}
Expand Down
4 changes: 3 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ buildscript {
}

plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.compose) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.android.application) apply false
}

allprojects {
Expand Down
17 changes: 9 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@ android-compile = "34"
android-min = "21"
android-target = "31"
androidx-lifecycle = "2.8.2"
compose = "1.6.8"
compose-compiler = "1.5.14"
compose = "1.6.11"
exercise = "0.12.0"
kable = "0.32.0"
kotlin = "1.9.24"
kotlin = "2.0.0"
krayon = "0.18.0"
ksp = "1.9.24-1.0.20"
ksp = "2.0.0-1.0.22"

[libraries]
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
compose-activity = { module = "androidx.activity:activity-compose", version = "1.9.0" }
compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "compose-compiler" }
compose-material = { module = "androidx.compose.material:material", version = "1.6.8" }
compose-tooling = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
compose-ui = { module = "androidx.compose.ui:ui", version = "compose" }
compose-bom = { module = "androidx.compose:compose-bom", version = "2024.06.00" }
compose-material = { module = "androidx.compose.material:material" }
compose-tooling = { module = "androidx.compose.ui:ui-tooling-preview" }
compose-ui = { module = "androidx.compose.ui:ui" }
compose-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" }
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.8.1" }
exercise-annotations = { module = "com.juul.exercise:annotations", version.ref = "exercise" }
Expand Down Expand Up @@ -53,5 +52,7 @@ krayon = [

[plugins]
android-application = { id = "com.android.library", version.ref = "agp" }
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
Loading