diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2019-05-22 02:17:33 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2019-05-22 02:17:33 +0200 |
commit | 36a3b94972fb30a1e9a17973d55179c7a4595b28 (patch) | |
tree | 0a7d6cd6cd8e89b081a88690029a42356a98a702 /sw-common-model | |
parent | Fix tests (diff) | |
download | seven-wonders-36a3b94972fb30a1e9a17973d55179c7a4595b28.tar.gz seven-wonders-36a3b94972fb30a1e9a17973d55179c7a4595b28.tar.bz2 seven-wonders-36a3b94972fb30a1e9a17973d55179c7a4595b28.zip |
Make common project multiplatform
Diffstat (limited to 'sw-common-model')
-rw-r--r-- | sw-common-model/build.gradle.kts | 44 | ||||
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt (renamed from sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Moves.kt (renamed from sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Moves.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Table.kt (renamed from sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/boards/Boards.kt (renamed from sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/boards/Boards.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/boards/RelativeBoardPosition.kt (renamed from sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/boards/RelativeBoardPosition.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/cards/Cards.kt (renamed from sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/cards/Cards.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/cards/HandRotationDirection.kt (renamed from sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/cards/HandRotationDirection.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/resources/Resources.kt (renamed from sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/resources/Resources.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/wonders/Wonders.kt (renamed from sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/wonders/Wonders.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/commonTest/kotlin/org/luxons/sevenwonders/game/api/WonderSidePickMethodTest.kt (renamed from sw-common-model/src/test/kotlin/org/luxons/sevenwonders/game/api/WonderSidePickMethodTest.kt) | 0 |
11 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")) + } + } + } } diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt index ac2c2b14..ac2c2b14 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Moves.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Moves.kt index 79a238b0..79a238b0 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Moves.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Moves.kt diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Table.kt index 62f66b21..62f66b21 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Table.kt diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/boards/Boards.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/boards/Boards.kt index 061bdcad..061bdcad 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/boards/Boards.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/boards/Boards.kt diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/boards/RelativeBoardPosition.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/boards/RelativeBoardPosition.kt index c7c3b5dc..c7c3b5dc 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/boards/RelativeBoardPosition.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/boards/RelativeBoardPosition.kt diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/cards/Cards.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/cards/Cards.kt index 4ccfe23b..4ccfe23b 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/cards/Cards.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/cards/Cards.kt diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/cards/HandRotationDirection.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/cards/HandRotationDirection.kt index b4669fbb..b4669fbb 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/cards/HandRotationDirection.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/cards/HandRotationDirection.kt diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/resources/Resources.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/resources/Resources.kt index fcfdd634..fcfdd634 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/resources/Resources.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/resources/Resources.kt diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/wonders/Wonders.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/wonders/Wonders.kt index 7148a924..7148a924 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/wonders/Wonders.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/wonders/Wonders.kt diff --git a/sw-common-model/src/test/kotlin/org/luxons/sevenwonders/game/api/WonderSidePickMethodTest.kt b/sw-common-model/src/commonTest/kotlin/org/luxons/sevenwonders/game/api/WonderSidePickMethodTest.kt index 9757ff86..9757ff86 100644 --- a/sw-common-model/src/test/kotlin/org/luxons/sevenwonders/game/api/WonderSidePickMethodTest.kt +++ b/sw-common-model/src/commonTest/kotlin/org/luxons/sevenwonders/game/api/WonderSidePickMethodTest.kt |