Add serialization dependency

This commit is contained in:
Oliver Rümpelein 2021-08-19 13:47:56 +02:00
parent 5a5f0e16a4
commit d68d195165
2 changed files with 8 additions and 6 deletions

View file

@ -4,11 +4,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { plugins {
kotlin("jvm") version "1.5.21" kotlin("jvm") version "1.5.21"
id("org.jetbrains.compose") version "1.0.0-alpha1" kotlin("plugin.serialization") version "1.5.21"
id("org.jetbrains.compose") version "1.0.0-alpha3"
} }
group = "de.pheerai" group = "de.pheerai"
version = "0.0.1-SNAPSHOT" version = "1.0.0-SNAPSHOT"
repositories { repositories {
jcenter() jcenter()
@ -19,6 +20,7 @@ repositories {
dependencies { dependencies {
implementation(compose.desktop.currentOs) implementation(compose.desktop.currentOs)
implementation("org.jetbrains.kotlinx", "kotlinx-serialization-json", "1.2.2")
testImplementation(kotlin("test")) testImplementation(kotlin("test"))
} }
@ -27,7 +29,7 @@ tasks.test {
} }
tasks.withType<KotlinCompile>() { tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "11" kotlinOptions.jvmTarget = JavaVersion.VERSION_16.toString()
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
} }
@ -35,7 +37,7 @@ compose.desktop {
application { application {
mainClass = "MainKt" mainClass = "MainKt"
nativeDistributions { nativeDistributions {
targetFormats(TargetFormat.Deb, TargetFormat.Rpm) targetFormats(TargetFormat.Pkg)
packageName = "jeopardy" packageName = "jeopardy"
val fullVersion = (project.version as String) val fullVersion = (project.version as String)
packageVersion = if (fullVersion.contains("-SNAPSHOT")) { packageVersion = if (fullVersion.contains("-SNAPSHOT")) {

View file

@ -8,8 +8,8 @@ import data.*
val game = Game( val game = Game(
title = "j-EP-ardy!", title = "j-EP-ardy!",
doubleAfter = 5, doubleAfter = 2,
endGameAfter = 2, endGameAfter = 5,
players = listOf( players = listOf(
Player(name = "Oli"), Player(name = "Oli"),
Player(name = "Gesina"), Player(name = "Gesina"),