Skip to content

Commit c97638e

Browse files
committed
Attempt to fix kotlin 2.2 issue
1 parent a5d68ca commit c97638e

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

buildSrc/src/main/java/Config.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import java.math.BigDecimal
44
object Config {
55
val AGP = System.getenv("VERSION_AGP") ?: "8.6.0"
66
val kotlinStdLib = "stdlib-jdk8"
7+
val kotlinTestJunit = "test-junit"
78

89
object BuildPlugins {
910
val androidGradle = "com.android.tools.build:gradle:$AGP"

sentry-spring-7/build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ configure<JavaPluginExtension> {
1919
}
2020

2121
tasks.withType<KotlinCompile>().configureEach {
22-
kotlinOptions {
23-
jvmTarget = JavaVersion.VERSION_17.toString()
24-
languageVersion = libs.versions.kotlin.compatible.version.get()
25-
freeCompilerArgs = listOf("-Xjsr305=strict")
22+
compilerOptions {
23+
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
24+
languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1)
25+
freeCompilerArgs.add("-Xjsr305=strict")
2626
}
2727
}
2828

@@ -57,11 +57,11 @@ dependencies {
5757
// tests
5858
testImplementation(projects.sentryTestSupport)
5959
testImplementation(projects.sentryGraphql)
60-
testImplementation(kotlin(Config.kotlinStdLib))
60+
testImplementation(kotlin(Config.kotlinStdLib, "2.2.0"))
6161
testImplementation(libs.awaitility.kotlin.spring7)
6262
testImplementation(libs.context.propagation)
6363
testImplementation(libs.graphql.java24)
64-
testImplementation(libs.kotlin.test.junit.spring7)
64+
testImplementation(kotlin(Config.kotlinTestJunit, "2.2.0"))
6565
testImplementation(libs.mockito.kotlin.spring7)
6666
testImplementation(libs.mockito.inline)
6767
testImplementation(libs.springboot4.starter.aop)

0 commit comments

Comments
 (0)