Files
kotlin-komponent/build.gradle.kts
2021-02-10 14:18:44 +01:00

84 lines
2.1 KiB
Kotlin

plugins {
kotlin("multiplatform") version "1.4.30"
`maven-publish`
}
group = "nl.astraeus"
version = "0.2.5-SNAPSHOT"
repositories {
mavenCentral()
jcenter()
}
kotlin {
/* Targets configuration omitted.
* To find out how to configure the targets, please follow the link:
* https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-targets */
js(BOTH) {
browser {
//produceKotlinLibrary()
testTask {
useKarma {
useChromeHeadless()
}
}
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation(kotlin("stdlib-common"))
api("org.jetbrains.kotlinx:kotlinx-html-js:0.7.2")
}
}
val jsMain by getting {
dependencies {
implementation(kotlin("stdlib-js"))
}
}
val jsTest by getting {
dependencies {
implementation(kotlin("test-js"))
}
}
}
}
publishing {
repositories {
if (project.properties["nexusUsername"] != null) {
maven {
name = "releases"
url = uri("http://nexus.astraeus.nl/nexus/content/repositories/releases")
credentials {
val nexusUsername: String by project
val nexusPassword: String by project
username = nexusUsername
password = nexusPassword
}
}
maven {
name = "snapshots"
url = uri("http://nexus.astraeus.nl/nexus/content/repositories/snapshots")
credentials {
val nexusUsername: String by project
val nexusPassword: String by project
username = nexusUsername
password = nexusPassword
}
}
} else {
println("Publishing disabled properties not found.")
}
}
publications {
val kotlinMultiplatform by getting {}
}
}