Skip to content

Commit

Permalink
update to kotlin 2
Browse files Browse the repository at this point in the history
  • Loading branch information
greenart7c3 committed Jul 5, 2024
1 parent e82d0a1 commit ded47b0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/build
/captures
.cxx
.kotlin/


# Built application files
Expand Down
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 15 additions & 6 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.devtools.ksp")
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
alias(libs.plugins.jetbrainsComposeCompiler)
}

android {
Expand Down Expand Up @@ -116,16 +119,12 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}

buildFeatures {
compose = true
buildConfig = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.14"
}

packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand All @@ -141,6 +140,16 @@ android {
}
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_17
}
}

composeCompiler {
reportsDestination = layout.buildDirectory.dir("compose_compiler")
}

dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.5.0" apply false
id("org.jetbrains.kotlin.android") version "1.9.24" apply false
id("org.jetbrains.kotlin.android") version "2.0.0" apply false
id ("com.android.library") version "8.5.0" apply false
id("com.google.devtools.ksp") version "1.9.24-1.0.20" apply false
id("com.google.devtools.ksp") version "2.0.0-1.0.22" apply false
}

tasks.register<Copy>("installGitHook") {
Expand Down
8 changes: 5 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@ activityCompose = "1.9.0"
composeBom = "2024.06.00"
composeUiVersion = "1.6.8"
coreKtx = "1.13.1"
espressoCore = "3.6.0"
espressoCore = "3.6.1"
jna = "5.14.0"
junitVersion = "1.2.0"
junitVersion = "1.2.1"
junit = "4.13.2"
kotlinxCoroutinesCore = "1.8.1"
ktorServer = "2.3.11"
lifecycleRuntimeKtx = "2.8.2"
lifecycleRuntimeKtx = "2.8.3"
navigationCompose = "2.7.7"
okhttp = "5.0.0-alpha.14"
room = "2.6.1"
storage = "1.5.5"
workRuntimeKtx = "2.9.0"
material3 = "1.2.1"
quartz = "d6ab376f2d"
kotlin = "2.0.0"

[libraries]
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
Expand Down Expand Up @@ -50,3 +51,4 @@ storage = { module = "com.anggrayudi:storage", version.ref = "storage" }
lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycleRuntimeKtx" }

[plugins]
jetbrainsComposeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

0 comments on commit ded47b0

Please sign in to comment.