Make target configuration optional

This commit is contained in:
Alexander Nozik 2023-02-03 13:15:17 +03:00
parent 99e3e1ea85
commit a26c7f6df0

View File

@ -233,7 +233,7 @@ public open class KScienceMppExtension(project: Project) : KScienceExtension(pro
/**
* Enable jvm target
*/
public fun jvm(block: KotlinJvmTarget.() -> Unit) {
public fun jvm(block: KotlinJvmTarget.() -> Unit = {}) {
project.pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") {
project.configure<KotlinMultiplatformExtension> {
jvm {
@ -270,7 +270,7 @@ public open class KScienceMppExtension(project: Project) : KScienceExtension(pro
/**
* Enable JS-IR (browser) target.
*/
public fun js(block: KotlinJsTargetDsl.() -> Unit) {
public fun js(block: KotlinJsTargetDsl.() -> Unit = {}) {
project.pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") {
project.configure<KotlinMultiplatformExtension> {
js(IR) {