Skip to content

Commit b6b4c13

Browse files
committed
gradle 9, jdk 21
1 parent 7120cfd commit b6b4c13

9 files changed

Lines changed: 52 additions & 36 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v6
1313
- uses: actions/setup-java@v5
1414
with:
15-
java-version: 17
15+
java-version: 21
1616
distribution: temurin
1717
cache: 'gradle'
1818
- name: Perform base checks
@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/checkout@v6
2525
- uses: actions/setup-java@v5
2626
with:
27-
java-version: 17
27+
java-version: 21
2828
distribution: temurin
2929
cache: 'gradle'
3030
- name: Execute unit tests
@@ -39,7 +39,7 @@ jobs:
3939
fetch-depth: 0
4040
- uses: actions/setup-java@v5
4141
with:
42-
java-version: 17
42+
java-version: 21
4343
distribution: temurin
4444
cache: 'gradle'
4545

.jitpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
jdk: openjdk17
1+
jdk: openjdk21

build-logic/convention/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ version = "0.1.0"
1111
java {
1212
// Up to Java 11 APIs are available through desugaring
1313
// https://developer.android.com/studio/write/java11-minimal-support-table
14-
sourceCompatibility = JavaVersion.VERSION_17
15-
targetCompatibility = JavaVersion.VERSION_17
14+
sourceCompatibility = JavaVersion.VERSION_21
15+
targetCompatibility = JavaVersion.VERSION_21
1616
}
1717

1818
tasks.withType<KotlinCompile>().configureEach {
1919
compilerOptions {
20-
jvmTarget.set(JvmTarget.JVM_17)
20+
jvmTarget.set(JvmTarget.JVM_21)
2121
}
2222
}
2323

build-logic/convention/src/main/kotlin/AndroidLibraryPublishingConventionPlugin.kt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ import org.gradle.kotlin.dsl.create
99
class AndroidLibraryPublishingConventionPlugin : Plugin<Project> {
1010
override fun apply(target: Project) {
1111
with(target) {
12-
extensions.configure<LibraryExtension> {
13-
with(pluginManager) {
14-
apply("maven-publish")
15-
}
16-
publishing {
17-
singleVariant("release") {
18-
group = "com.github.markusressel.KodeEditor"
19-
withJavadocJar()
20-
withSourcesJar()
12+
pluginManager.apply("maven-publish")
13+
14+
extensions.apply {
15+
configure<LibraryExtension> {
16+
publishing {
17+
singleVariant("release") {
18+
group = "com.github.markusressel.KodeEditor"
19+
withJavadocJar()
20+
withSourcesJar()
21+
}
2122
}
2223
}
2324
configure<PublishingExtension> {

build-logic/convention/src/main/kotlin/de/markusressel/kodeeditor/AndroidCompose.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import java.io.File
1313
* Configure Compose-specific options
1414
*/
1515
internal fun Project.configureAndroidCompose(
16-
commonExtension: CommonExtension<*, *, *, *, *, *>,
16+
commonExtension: CommonExtension,
1717
) {
1818
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
1919
pluginManager.apply("org.jetbrains.kotlin.plugin.compose")
2020

2121
commonExtension.apply {
22-
buildFeatures {
22+
buildFeatures.apply {
2323
compose = true
2424
}
2525

build-logic/convention/src/main/kotlin/de/markusressel/kodeeditor/KotlinAndroid.kt

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import org.gradle.api.artifacts.VersionCatalogsExtension
77
import org.gradle.kotlin.dsl.*
88
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
99
import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension
10+
import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
1011
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1112

1213
const val COMPILE_SDK = 36
@@ -16,20 +17,24 @@ const val TARGET_SDK = 34
1617
* Configure base Kotlin with Android options
1718
*/
1819
internal fun Project.configureKotlinAndroid(
19-
commonExtension: CommonExtension<*, *, *, *, *, *>,
20+
commonExtension: CommonExtension,
2021
) {
2122
commonExtension.apply {
2223
compileSdk = COMPILE_SDK
2324

24-
defaultConfig {
25-
minSdk = 21
25+
kotlinExtension.apply {
26+
jvmToolchain(21)
2627
}
2728

28-
compileOptions {
29+
defaultConfig.apply {
30+
minSdk = 23
31+
}
32+
33+
compileOptions.apply {
2934
// Up to Java 11 APIs are available through desugaring
3035
// https://developer.android.com/studio/write/java11-minimal-support-table
31-
sourceCompatibility = JavaVersion.VERSION_17
32-
targetCompatibility = JavaVersion.VERSION_17
36+
sourceCompatibility = JavaVersion.VERSION_21
37+
targetCompatibility = JavaVersion.VERSION_21
3338
isCoreLibraryDesugaringEnabled = true
3439
}
3540
}
@@ -38,7 +43,7 @@ internal fun Project.configureKotlinAndroid(
3843
tasks.withType<KotlinCompile>().configureEach {
3944
compilerOptions {
4045
// Set JVM target to 11
41-
jvmTarget.set(JvmTarget.JVM_17)
46+
jvmTarget.set(JvmTarget.JVM_21)
4247
// Treat all Kotlin warnings as errors (disabled by default)
4348
// Override by setting warningsAsErrors=true in your ~/.gradle/gradle.properties
4449
val warningsAsErrors: String? by project
@@ -64,6 +69,6 @@ internal fun Project.configureKotlinAndroid(
6469
*/
6570
internal fun Project.configureKotlinAndroidToolchain() {
6671
extensions.configure<KotlinAndroidProjectExtension> {
67-
jvmToolchain(17)
72+
jvmToolchain(21)
6873
}
6974
}

gradle.properties

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,14 @@ org.gradle.jvmargs=-Xmx1536m
1414
android.useAndroidX=true
1515
android.enableJetifier=false
1616
android.nonTransitiveRClass=false
17-
android.nonFinalResIds=false
17+
android.nonFinalResIds=false
18+
android.defaults.buildfeatures.resvalues=true
19+
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
20+
android.enableAppCompileTimeRClass=false
21+
android.usesSdkInManifest.disallowed=false
22+
android.uniquePackageNames=false
23+
android.dependency.useConstraints=true
24+
android.r8.strictFullModeForKeepRules=false
25+
android.r8.optimizedResourceShrinking=false
26+
android.builtInKotlin=false
27+
android.newDsl=false

gradle/libs.versions.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
[versions]
2-
activityCompose = "1.11.0"
2+
activityCompose = "1.12.4"
33
androidComposeMaterial3 = "1.4.0"
44
androidDesugarJdkLibs = "2.1.5"
5-
androidGradlePlugin = "8.13.0"
5+
androidGradlePlugin = "9.0.0"
66
androidxAnnotation = "1.9.1"
77
androidxAppCompat = "1.7.1"
8-
androidxComposeBom = "2025.10.01"
9-
androidxComposeUi = "1.9.4"
10-
androidxComposeUiText = "1.9.4"
11-
androidxLifecycle = "2.9.4"
8+
androidxComposeBom = "2026.02.01"
9+
androidxComposeUi = "1.10.4"
10+
androidxComposeUiText = "1.10.4"
11+
androidxLifecycle = "2.10.0"
1212
androidxTestExtJunit = "1.3.0"
1313
androidxTestEspressoCore = "3.7.0"
1414
dokkaGradlePlugin = "2.1.0"
1515
fuel = "2.3.1"
1616
flowbindingAndroid = "1.2.0"
1717
junit4 = "4.13.2"
18-
kotlin = "2.2.21"
18+
kotlin = "2.3.10"
1919
kotlinCoroutinesCore = "1.10.2"
2020
kotlinCoroutinesAndroid = "1.10.2"
2121
kodehighlighter = "4.0.4"
22-
ksp = "2.3.0"
22+
ksp = "2.3.2"
2323
material = "1.13.0"
2424
zoomlayout = "1.9.0"
2525

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip

0 commit comments

Comments
 (0)