From a1ba8c6940adc25368e3701405928dab58a543ee Mon Sep 17 00:00:00 2001 From: Oleg Date: Fri, 15 Sep 2023 17:18:57 +0400 Subject: [PATCH] Remove deprecations from build.gradle file --- build.gradle | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index 9baf9cf..c08b3f9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget -import org.jetbrains.kotlin.gradle.tasks.KaptGenerateStubs +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import com.github.jk1.license.filter.LicenseBundleNormalizer import com.github.jk1.license.render.JsonReportRenderer @@ -79,13 +79,13 @@ test { } application { - mainClassName 'com.exactpro.th2.conn.dirty.tcp.core.Main' + mainClass.set('com.exactpro.th2.conn.dirty.tcp.core.Main') } applicationName = 'service' distTar { - archiveName "${applicationName}.tar" + archiveFileName.set("${applicationName}.tar") } dockerPrepare { @@ -96,19 +96,7 @@ docker { copySpec.from(tarTree("$buildDir/distributions/${applicationName}.tar")) } -tasks.withType(KaptGenerateStubs).configureEach { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_11) - } -} - -compileKotlin { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_11) - } -} - -compileTestKotlin { +tasks.withType(KotlinCompile).configureEach { compilerOptions { jvmTarget.set(JvmTarget.JVM_11) }