summaryrefslogtreecommitdiff
path: root/sw-common-model/build.gradle.kts
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2019-05-22 02:17:33 +0200
committerJoffrey BION <joffrey.bion@gmail.com>2019-05-22 02:17:33 +0200
commit36a3b94972fb30a1e9a17973d55179c7a4595b28 (patch)
tree0a7d6cd6cd8e89b081a88690029a42356a98a702 /sw-common-model/build.gradle.kts
parentFix tests (diff)
downloadseven-wonders-36a3b94972fb30a1e9a17973d55179c7a4595b28.tar.gz
seven-wonders-36a3b94972fb30a1e9a17973d55179c7a4595b28.tar.bz2
seven-wonders-36a3b94972fb30a1e9a17973d55179c7a4595b28.zip
Make common project multiplatform
Diffstat (limited to 'sw-common-model/build.gradle.kts')
-rw-r--r--sw-common-model/build.gradle.kts44
1 files changed, 38 insertions, 6 deletions
diff --git a/sw-common-model/build.gradle.kts b/sw-common-model/build.gradle.kts
index 81c58543..c1c6e3fe 100644
--- a/sw-common-model/build.gradle.kts
+++ b/sw-common-model/build.gradle.kts
@@ -1,11 +1,43 @@
plugins {
- kotlin("jvm")
+ kotlin("multiplatform")
id("org.jlleitschuh.gradle.ktlint")
}
-dependencies {
- implementation(kotlin("stdlib-jdk8"))
-
- testImplementation(kotlin("test"))
- testImplementation(kotlin("test-junit"))
+kotlin {
+ jvm()
+ js()
+ sourceSets {
+ val commonMain by getting {
+ dependencies {
+ implementation(kotlin("stdlib-common"))
+ }
+ }
+ val commonTest by getting {
+ dependencies {
+ implementation(kotlin("test-common"))
+ implementation(kotlin("test-annotations-common"))
+ }
+ }
+ val jvmMain by getting {
+ dependencies {
+ implementation(kotlin("stdlib-jdk8"))
+ }
+ }
+ val jvmTest by getting {
+ dependencies {
+ implementation(kotlin("test"))
+ implementation(kotlin("test-junit"))
+ }
+ }
+ val jsMain by getting {
+ dependencies {
+ implementation(kotlin("stdlib-js"))
+ }
+ }
+ val jsTest by getting {
+ dependencies {
+ implementation(kotlin("test-js"))
+ }
+ }
+ }
}
bgstack15