Skip to content

Commit 3659460

Browse files
authored
Migrate freeCompilerArgs to new DSL (recloudstream#2248)
`jvmDefault.set(JvmDefaultMode.ENABLE)` is equivalent to `-jvm-default=enable`, which replaces `-Xjvm-default=all-compatibility` in Kotlin 2.2, it doesn't yet warn, but does in Kotlin 2.3. https://youtrack.jetbrains.com/issue/KT-61649 https://youtrack.jetbrains.com/issue/KT-74590 https://youtrack.jetbrains.com/issue/KT-76353 https://kotlinlang.org/docs/gradle-compiler-options.html#migrate-freecompilerargs
1 parent a3a7b70 commit 3659460

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

app/build.gradle.kts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
22
import org.jetbrains.dokka.gradle.engine.parameters.KotlinPlatform
33
import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier
4+
import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode
45
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
56
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
67

@@ -272,11 +273,9 @@ tasks.register<Jar>("makeJar") {
272273
tasks.withType<KotlinJvmCompile> {
273274
compilerOptions {
274275
jvmTarget.set(javaTarget)
275-
freeCompilerArgs.addAll(
276-
"-Xjvm-default=all-compatibility",
277-
"-Xannotation-default-target=param-property",
278-
"-opt-in=com.lagradost.cloudstream3.Prerelease"
279-
)
276+
jvmDefault.set(JvmDefaultMode.ENABLE)
277+
optIn.add("com.lagradost.cloudstream3.Prerelease")
278+
freeCompilerArgs.add("-Xannotation-default-target=param-property")
280279
}
281280
}
282281

0 commit comments

Comments
 (0)