diff options
Diffstat (limited to 'build.gradle.kts')
-rw-r--r-- | build.gradle.kts | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 0844de8..b83f6d8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,41 +1,47 @@ plugins { - kotlin("js") version "1.7.10" + kotlin("multiplatform") version "1.7.10" + `maven-publish` } -allprojects { - apply(plugin = "org.jetbrains.kotlin.js") - repositories { - mavenCentral() - } +repositories { + mavenCentral() +} +group = "moe.nea" +version = "0.0.1" - kotlin { - sourceSets.all { - languageSettings.optIn("kotlin.ExperimentalStdlibApi") - languageSettings.optIn("kotlin.RequiresOptIn") - } - js(IR) { - browser { - commonWebpackConfig { - sourceMaps = true - cssSupport.enabled = true - } +kotlin { + sourceSets.all { + languageSettings.optIn("kotlin.ExperimentalStdlibApi") + languageSettings.optIn("kotlin.RequiresOptIn") + } + js(IR) { + browser { + commonWebpackConfig { + sourceMaps = true + cssSupport.enabled = true } - binaries.executable() } + binaries.executable() } - - afterEvaluate { - rootProject.extensions.configure<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension> { - versions.webpackCli.version = "4.10.0" + sourceSets { + named("jsMain") { + dependencies { + api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") + api("org.jetbrains.kotlin-wrappers:kotlin-styled:5.3.5-pre.376") + } } } +} + - dependencies { - implementation(enforcedPlatform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:1.0.0-pre.376")) - api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") - api("org.jetbrains.kotlin-wrappers:kotlin-styled") - // implementation(npm("prop-types", "^15.6.2")) +publishing { + repositories { + mavenLocal() + } + publications { + create<MavenPublication>("library") { + from(components["kotlin"]) + } } } -group = "moe.nea" -version = "0.0.1"
\ No newline at end of file + |