Skip to content

Commit

Permalink
app: Upgrade Gradle JDK to 21
Browse files Browse the repository at this point in the history
  • Loading branch information
YuKongA committed Nov 18, 2024
1 parent 3761d33 commit cb96f53
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Action CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-version: '21'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
Expand Down
8 changes: 7 additions & 1 deletion composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ val verName = "1.5.0"
val verCode = getVersionCode()
val xcf = XCFramework(appName + "Framework")

java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}

kotlin {
jvmToolchain(17)
jvmToolchain(21)

androidTarget()

Expand Down Expand Up @@ -167,6 +171,8 @@ compose.desktop {

buildTypes.release.proguard {
configurationFiles.from("proguard-rules-jvm.pro")
version.set("7.6.0")
optimize.set(false)
}

nativeDistributions {
Expand Down
18 changes: 10 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
kotlin.code.style=official
xcodeproj=./iosApp
#Gradle
org.gradle.jvmargs=-Xmx8g
# Gradle
org.gradle.jvmargs=-Xmx8g -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configureondemand=true
# Android
android.nonTransitiveRClass=true
android.useAndroidX=true
# K/JS & K/WASM
org.jetbrains.compose.experimental.jscanvas.enabled=true
org.jetbrains.compose.experimental.wasm.enabled=true
android.nonTransitiveRClass=true
# kotlin
kotlin.code.style=official
# MPP
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.enableCInteropCommonization=true
Expand All @@ -18,5 +17,8 @@ kotlin.incremental.useClasspathSnapshot=true
# Native
kotlin.native.ignoreDisabledTargets=true
kotlin.native.useEmbeddableCompilerJar=true
# Experimental
org.jetbrains.compose.experimental.jscanvas.enabled=true
# Xcode
kotlin.apple.xcodeCompatibility.nowarn=true
xcodeproj=./iosApp
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@ dependencyResolutionManagement {
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.4.0")
}

include(":composeApp")

0 comments on commit cb96f53

Please sign in to comment.