From e0bdb8513efa41cd1c98d817d9b48c536b60f442 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Sun, 20 Jun 2021 15:20:32 +0200 Subject: [PATCH] Fix the compiler arguments --- build.gradle.kts | 15 +++++++++------ src/main/kotlin/main.kt | 1 - 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3e76a0c..e533f7a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,6 +17,15 @@ dependencies { kotlin { js(IR) { moduleName = "Username404_Website" + compilations.all { + with(kotlinOptions) { + freeCompilerArgs = freeCompilerArgs + listOf( + "-Xopt-in=kotlin.RequiresOptIn", + "-Xopt-in=kotlin.js.ExperimentalJsExport", + "-progressive" + ) + } + } browser { webpackTask { output.libraryTarget = "global" @@ -37,9 +46,3 @@ kotlin { binaries.executable() } } - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) { - with(kotlinOptions) { - freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn", "-progressive") - } -} \ No newline at end of file diff --git a/src/main/kotlin/main.kt b/src/main/kotlin/main.kt index 1c9af08..3e21972 100644 --- a/src/main/kotlin/main.kt +++ b/src/main/kotlin/main.kt @@ -1,4 +1,3 @@ -@file:OptIn(ExperimentalJsExport::class) package fr.username404.website import kotlinx.browser.document