KOTLIN_BROADCAST Telegram 1719
Новое DSL на замену Gradle Application плагина

В Kotlin 2.1.20 появилось новое экспериментальное DSL для замены функций Gradle Application плагин (несовместим с KMP Gradle плагин, начиная с Gradle 8.7)

kotlin {
jvm {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
binaries {
// Configures a JavaExec task named "runJvm"
// and a Gradle distribution for the "main" compilation in this target
executable {
mainClass.set("foo.MainKt")
}

// Configures a JavaExec task named "runJvmAnother"
// and a Gradle distribution for the "main" compilation
executable(KotlinCompilation.MAIN_COMPILATION_NAME, "another") {
// Set a different class
mainClass.set("foo.MainAnotherKt")
}

// Configures a JavaExec task named "runJvmTest"
// and a Gradle distribution for the "test" compilation
executable(KotlinCompilation.TEST_COMPILATION_NAME) {
mainClass.set("foo.MainTestKt")
}

// Configures a JavaExec task named "runJvmTestAnother"
// and a Gradle distribution for the "test" compilation
executable(KotlinCompilation.TEST_COMPILATION_NAME, "another") {
mainClass.set("foo.MainAnotherTestKt")
}
}
}
}


#kotlin #gradle #kmp



tgoop.com/kotlin_broadcast/1719
Create:
Last Update:

Новое DSL на замену Gradle Application плагина

В Kotlin 2.1.20 появилось новое экспериментальное DSL для замены функций Gradle Application плагин (несовместим с KMP Gradle плагин, начиная с Gradle 8.7)

kotlin {
jvm {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
binaries {
// Configures a JavaExec task named "runJvm"
// and a Gradle distribution for the "main" compilation in this target
executable {
mainClass.set("foo.MainKt")
}

// Configures a JavaExec task named "runJvmAnother"
// and a Gradle distribution for the "main" compilation
executable(KotlinCompilation.MAIN_COMPILATION_NAME, "another") {
// Set a different class
mainClass.set("foo.MainAnotherKt")
}

// Configures a JavaExec task named "runJvmTest"
// and a Gradle distribution for the "test" compilation
executable(KotlinCompilation.TEST_COMPILATION_NAME) {
mainClass.set("foo.MainTestKt")
}

// Configures a JavaExec task named "runJvmTestAnother"
// and a Gradle distribution for the "test" compilation
executable(KotlinCompilation.TEST_COMPILATION_NAME, "another") {
mainClass.set("foo.MainAnotherTestKt")
}
}
}
}


#kotlin #gradle #kmp

BY Kotlin Multiplatform Broadcast


Share with your friend now:
tgoop.com/kotlin_broadcast/1719

View MORE
Open in Telegram


Telegram News

Date: |

Select “New Channel” Other crimes that the SUCK Channel incited under Ng’s watch included using corrosive chemicals to make explosives and causing grievous bodily harm with intent. The court also found Ng responsible for calling on people to assist protesters who clashed violently with police at several universities in November 2019. bank east asia october 20 kowloon Polls The optimal dimension of the avatar on Telegram is 512px by 512px, and it’s recommended to use PNG format to deliver an unpixelated avatar.
from us


Telegram Kotlin Multiplatform Broadcast
FROM American