Skip to content

Commit 6533a60

Browse files
committed
update to Kotlin 2.0.21 and friends
1 parent 31058a0 commit 6533a60

File tree

37 files changed

+750
-674
lines changed

37 files changed

+750
-674
lines changed

.github/workflows/ci.yml

+28-26
Original file line numberDiff line numberDiff line change
@@ -93,27 +93,27 @@ jobs:
9393
uses: rickbusarow/actions/gradle-task-with-commit@bf0940965387f10bcb8b6699a79499d18167dfbe # v1
9494
with:
9595
personal-access-token: ${{ steps.app-token.outputs.token }}
96-
fix-task: dependencyGuardBaseline
97-
check-task: dependencyGuard
98-
99-
moduleCheck:
100-
runs-on: ubuntu-latest
101-
needs: build-all
102-
steps:
103-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
104-
- name: Create GitHub App Token
105-
uses: actions/create-github-app-token@136412a57a7081aa63c935a2cc2918f76c34f514 # v1
106-
id: app-token
107-
with:
108-
app-id: ${{ secrets.PR_BOT_APP_ID }}
109-
private-key: ${{ secrets.PR_BOT_PRIVATE_KEY }}
110-
111-
- name: moduleCheck
112-
uses: rickbusarow/actions/gradle-task-with-commit@bf0940965387f10bcb8b6699a79499d18167dfbe # v1
113-
with:
114-
personal-access-token: ${{ steps.app-token.outputs.token }}
115-
fix-task: moduleCheckAuto
116-
check-task: moduleCheck
96+
fix-task: dependencyGuardBaseline --no-parallel
97+
check-task: dependencyGuard --no-parallel
98+
99+
# moduleCheck:
100+
# runs-on: ubuntu-latest
101+
# needs: build-all
102+
# steps:
103+
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
104+
# - name: Create GitHub App Token
105+
# uses: actions/create-github-app-token@136412a57a7081aa63c935a2cc2918f76c34f514 # v1
106+
# id: app-token
107+
# with:
108+
# app-id: ${{ secrets.PR_BOT_APP_ID }}
109+
# private-key: ${{ secrets.PR_BOT_PRIVATE_KEY }}
110+
#
111+
# - name: moduleCheck
112+
# uses: rickbusarow/actions/gradle-task-with-commit@bf0940965387f10bcb8b6699a79499d18167dfbe # v1
113+
# with:
114+
# personal-access-token: ${{ steps.app-token.outputs.token }}
115+
# fix-task: moduleCheckAuto
116+
# check-task: moduleCheck
117117

118118
doks:
119119
runs-on: ubuntu-latest
@@ -292,11 +292,13 @@ jobs:
292292
fail-fast: false
293293
### <start-versions-matrix>
294294
matrix:
295-
kotlin-version: [ 1.9.22 ]
296-
gradle-version: [ 8.5, 8.6 ]
295+
kotlin-version: [ 2.0.21 ]
296+
gradle-version: [ 8.5, 8.12.1 ]
297297
agp-version: [ 8.0.2, 8.1.0 ]
298-
anvil-version: [ 2.4.9 ]
299-
exclude: [ ]
298+
anvil-version: [ 2.5.0, 2.5.1 ]
299+
exclude:
300+
- kotlin-version: 2.0.21
301+
anvil-version: 2.5.0
300302
### <end-versions-matrix>
301303
runs-on: ubuntu-latest
302304
steps:
@@ -367,7 +369,7 @@ jobs:
367369
- integration-tests-ubuntu
368370
- integration-tests-windows
369371
- ktlint
370-
- moduleCheck
372+
# - moduleCheck
371373
- unit-tests
372374
- validate-wrapper
373375
- website-versioning

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,5 @@ java_pid1690.hprof
6767
build-logic/.editorconfig
6868

6969
**/node_modules/
70+
71+
.kotlin/

.idea/ktlint-plugin.xml

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build-logic/build.gradle.kts

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2024 Rick Busarow
2+
* Copyright (C) 2021-2025 Rick Busarow
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -13,7 +13,9 @@
1313
* limitations under the License.
1414
*/
1515

16+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
1617
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
18+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
1719
import org.jetbrains.kotlin.gradle.plugin.KotlinBasePlugin
1820

1921
plugins {
@@ -55,27 +57,24 @@ allprojects ap@{
5557
jvmToolchain {
5658
languageVersion.set(JavaLanguageVersion.of(libs.versions.jdk.get()))
5759
}
60+
compilerOptions {
61+
val versionProvider = libs.versions.kotlinApi
62+
.map { KotlinVersion.fromVersion(it) }
63+
64+
languageVersion.set(versionProvider)
65+
apiVersion.set(versionProvider)
66+
67+
jvmTarget = libs.versions.jvmTarget.map { JvmTarget.fromTarget(it) }
68+
69+
optIn.add("kotlin.RequiresOptIn")
70+
}
5871
}
5972
}
6073
plugins.withType(JavaPlugin::class.java).configureEach {
6174
extensions.configure(JavaPluginExtension::class.java) {
6275
sourceCompatibility = JavaVersion.toVersion(libs.versions.jvmTarget.get())
6376
}
6477
}
65-
66-
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
67-
kotlinOptions {
68-
69-
languageVersion = "1.6"
70-
apiVersion = "1.6"
71-
72-
jvmTarget = libs.versions.jvmTarget.get()
73-
74-
freeCompilerArgs = freeCompilerArgs + listOf(
75-
"-opt-in=kotlin.RequiresOptIn"
76-
)
77-
}
78-
}
7978
}
8079

8180
tasks.withType<Delete>().configureEach rootTask@{

build-logic/versions-matrix/src/main/kotlin/modulecheck/builds/matrix/VersionsMatrix.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2024 Rick Busarow
2+
* Copyright (C) 2021-2025 Rick Busarow
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -22,7 +22,9 @@ class VersionsMatrix(
2222
val kotlinList: List<String>
2323
) {
2424

25-
internal val exclusions = listOf<Exclusion>().requireNoDuplicates()
25+
internal val exclusions = listOf<Exclusion>(
26+
Exclusion(anvil = "2.5.0", kotlin = "2.0.21")
27+
).requireNoDuplicates()
2628

2729
// ORDER MATTERS.
2830
// ...at least with regard to Gradle.

build-logic/versions-matrix/src/main/kotlin/modulecheck/builds/matrix/VersionsMatrixExtension.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2024 Rick Busarow
2+
* Copyright (C) 2021-2025 Rick Busarow
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -63,10 +63,10 @@ open class Versions @Inject constructor(
6363
)
6464

6565
companion object {
66-
internal val gradleListDefault = listOf("8.5", "8.6")
66+
internal val gradleListDefault = listOf("8.5", "8.12.1")
6767
internal val agpListDefault = listOf("8.0.2", "8.1.0")
68-
internal val anvilListDefault = listOf("2.4.9")
69-
internal val kotlinListDefault = listOf("1.9.22")
68+
internal val anvilListDefault = listOf("2.5.0", "2.5.1")
69+
internal val kotlinListDefault = listOf("2.0.21")
7070
}
7171
}
7272

0 commit comments

Comments
 (0)