From ea31fecc117037722d5595026c7f16653f57f43a Mon Sep 17 00:00:00 2001 From: NovaFox161 Date: Thu, 26 Dec 2024 22:42:08 -0600 Subject: [PATCH] Finally got rid of this warning about deprecation --- build.gradle.kts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index e26081ca..4a0766fd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ import org.gradle.api.tasks.wrapper.Wrapper.DistributionType.ALL +import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { @@ -138,11 +139,9 @@ allprojects { subprojects { tasks { withType { - @Suppress("DEPRECATION") - // FIXME: This is marked as deprecated but the related link does not seem to work, and no quick fix is available - kotlinOptions { - freeCompilerArgs = listOf("-Xjsr305=strict") - jvmTarget = java.targetCompatibility.majorVersion + compilerOptions { + freeCompilerArgs.set(listOf("-Xjsr305=strict")) + jvmTarget.set(JvmTarget.fromTarget(java.targetCompatibility.majorVersion)) } } }