diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2019-05-17 00:01:57 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2019-05-17 00:01:57 +0200 |
commit | 101dcb7213f4ebf759b0aad65f0976b7f78f4a86 (patch) | |
tree | e71fb265979f591cb349f474371846fa670ca2b9 | |
parent | Rationalize module names (diff) | |
download | seven-wonders-101dcb7213f4ebf759b0aad65f0976b7f78f4a86.tar.gz seven-wonders-101dcb7213f4ebf759b0aad65f0976b7f78f4a86.tar.bz2 seven-wonders-101dcb7213f4ebf759b0aad65f0976b7f78f4a86.zip |
WIP back to JVM for common module to see if it works
-rw-r--r-- | build.gradle.kts | 7 | ||||
-rw-r--r-- | sw-common-model/build.gradle | 42 | ||||
-rw-r--r-- | sw-common-model/build.gradle.kts | 8 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Boards.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Table.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPosition.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPosition.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirection.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirection.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/moves/MoveType.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/moves/MoveType.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/Provider.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/resources/Provider.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceType.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/resources/ResourceType.kt) | 0 | ||||
-rw-r--r-- | sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt) | 0 | ||||
-rw-r--r-- | sw-engine/build.gradle.kts | 8 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt | 4 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt | 1 | ||||
-rw-r--r-- | sw-server/build.gradle.kts | 6 |
19 files changed, 20 insertions, 56 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 8dd57a32..2c7fa0ad 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,11 +2,16 @@ plugins { val kotlinVersion = "1.3.31" kotlin("jvm") version kotlinVersion apply false kotlin("multiplatform") version kotlinVersion apply false - id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion apply false + kotlin("plugin.spring") version kotlinVersion apply false + id("org.jlleitschuh.gradle.ktlint") version "7.1.0" apply false } subprojects { repositories { jcenter() } + + tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { + kotlinOptions.jvmTarget = "1.8" + } } diff --git a/sw-common-model/build.gradle b/sw-common-model/build.gradle deleted file mode 100644 index b8bdb97b..00000000 --- a/sw-common-model/build.gradle +++ /dev/null @@ -1,42 +0,0 @@ -plugins { - id 'kotlin-multiplatform' -} - -kotlin { - jvm() - js() - sourceSets { - commonMain { - dependencies { - implementation kotlin('stdlib-common') - } - } - commonTest { - dependencies { - implementation kotlin('test-common') - implementation kotlin('test-annotations-common') - } - } - jvmMain { - dependencies { - implementation kotlin('stdlib-jdk8') - } - } - jvmTest { - dependencies { - implementation kotlin('test') - implementation kotlin('test-junit') - } - } - jsMain { - dependencies { - implementation kotlin('stdlib-js') - } - } - jsTest { - dependencies { - implementation kotlin('test-js') - } - } - } -} diff --git a/sw-common-model/build.gradle.kts b/sw-common-model/build.gradle.kts new file mode 100644 index 00000000..9c8eff58 --- /dev/null +++ b/sw-common-model/build.gradle.kts @@ -0,0 +1,8 @@ +plugins { + kotlin("jvm") + id("org.jlleitschuh.gradle.ktlint") +} + +dependencies { + implementation(kotlin("stdlib-jdk8")) +} diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Boards.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt index 698615e9..698615e9 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Boards.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt index ac2c2b14..ac2c2b14 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/CustomizableSettings.kt diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt index c5feb6c5..c5feb6c5 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Table.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt index 23ab6ee2..23ab6ee2 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/api/Table.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPosition.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPosition.kt index 3a8387a3..3a8387a3 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPosition.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPosition.kt diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt index ab0e0297..ab0e0297 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirection.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirection.kt index a10ec19f..a10ec19f 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirection.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirection.kt diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/moves/MoveType.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/moves/MoveType.kt index d982c100..d982c100 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/moves/MoveType.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/moves/MoveType.kt diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/resources/Provider.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/Provider.kt index 5d0f3159..5d0f3159 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/resources/Provider.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/Provider.kt diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt index 77a8670d..77a8670d 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/resources/ResourceType.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceType.kt index 5c92b887..5c92b887 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/resources/ResourceType.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceType.kt diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt index 6480e935..6480e935 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt diff --git a/sw-engine/build.gradle.kts b/sw-engine/build.gradle.kts index e85d396f..9e6da395 100644 --- a/sw-engine/build.gradle.kts +++ b/sw-engine/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - id("org.jetbrains.kotlin.jvm") - id("org.jlleitschuh.gradle.ktlint") version "7.1.0" + kotlin("jvm") + id("org.jlleitschuh.gradle.ktlint") } dependencies { @@ -10,7 +10,3 @@ dependencies { testImplementation(kotlin("test")) testImplementation(kotlin("test-junit")) } - -tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { - kotlinOptions.jvmTarget = "1.8" -} diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt index a63ccdd6..82075d5c 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt @@ -1,11 +1,10 @@ package org.luxons.sevenwonders.game -import org.junit.Test import org.luxons.sevenwonders.game.api.Action -import org.luxons.sevenwonders.game.cards.HandCard import org.luxons.sevenwonders.game.api.PlayedMove import org.luxons.sevenwonders.game.api.PlayerMove import org.luxons.sevenwonders.game.api.PlayerTurnInfo +import org.luxons.sevenwonders.game.cards.HandCard import org.luxons.sevenwonders.game.cards.TableCard import org.luxons.sevenwonders.game.data.GameDefinition import org.luxons.sevenwonders.game.data.LAST_AGE @@ -13,6 +12,7 @@ import org.luxons.sevenwonders.game.moves.MoveType import org.luxons.sevenwonders.game.resources.ResourceTransactions import org.luxons.sevenwonders.game.resources.noTransactions import org.luxons.sevenwonders.game.test.testCustomizableSettings +import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFalse import kotlin.test.assertTrue diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt index 78386b3d..ba6c1727 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt @@ -18,6 +18,7 @@ import org.luxons.sevenwonders.game.effects.Effect import org.luxons.sevenwonders.game.effects.ScienceProgress import org.luxons.sevenwonders.game.moves.Move import org.luxons.sevenwonders.game.moves.MoveType +import org.luxons.sevenwonders.game.moves.resolve import org.luxons.sevenwonders.game.resources.Production import org.luxons.sevenwonders.game.resources.Provider import org.luxons.sevenwonders.game.resources.ResourceTransaction diff --git a/sw-server/build.gradle.kts b/sw-server/build.gradle.kts index 99374cdf..ecfb5380 100644 --- a/sw-server/build.gradle.kts +++ b/sw-server/build.gradle.kts @@ -2,15 +2,11 @@ plugins { kotlin("jvm") kotlin("plugin.spring") id("org.springframework.boot") version "2.1.3.RELEASE" - id("org.jlleitschuh.gradle.ktlint") version "7.1.0" + id("org.jlleitschuh.gradle.ktlint") } apply(plugin = "io.spring.dependency-management") -tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { - kotlinOptions.jvmTarget = "1.8" -} - dependencies { compile(project(":sw-common-model")) compile(project(":sw-engine")) |