Telegram Group & Telegram Channel
Новое 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



tg-me.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


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/kotlin_broadcast/1719

View MORE
Open in Telegram


Kotlin Multiplatform Broadcast Telegram | DID YOU KNOW?

Date: |

The Singapore stock market has alternated between positive and negative finishes through the last five trading days since the end of the two-day winning streak in which it had added more than a dozen points or 0.4 percent. The Straits Times Index now sits just above the 3,060-point plateau and it's likely to see a narrow trading range on Monday.

How Does Bitcoin Mining Work?

Bitcoin mining is the process of adding new transactions to the Bitcoin blockchain. It’s a tough job. People who choose to mine Bitcoin use a process called proof of work, deploying computers in a race to solve mathematical puzzles that verify transactions.To entice miners to keep racing to solve the puzzles and support the overall system, the Bitcoin code rewards miners with new Bitcoins. “This is how new coins are created” and new transactions are added to the blockchain, says Okoro.

Kotlin Multiplatform Broadcast from us


Telegram Kotlin Multiplatform Broadcast
FROM USA