mirror of
https://github.com/InsanusMokrassar/PsychomatrixBase.git
synced 2024-11-24 11:08:53 +00:00
migration onto newer version of kotlin
This commit is contained in:
parent
185c0a87af
commit
ae0ea72f55
@ -11,7 +11,6 @@ buildscript {
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
||||
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$gradle_bintray_plugin_version"
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,7 +28,7 @@ repositories {
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlin_serialisation_runtime_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlin_serialisation_runtime_version"
|
||||
implementation "joda-time:joda-time:$joda_time_version"
|
||||
|
||||
// Use JUnit test framework
|
||||
|
@ -1,7 +1,7 @@
|
||||
kotlin.code.style=official
|
||||
kotlin_version=1.3.31
|
||||
kotlin_coroutines_version=1.2.1
|
||||
kotlin_serialisation_runtime_version=0.11.0
|
||||
kotlin_version=1.5.0
|
||||
kotlin_coroutines_version=1.4.3
|
||||
kotlin_serialisation_runtime_version=1.2.0
|
||||
joda_time_version=2.10.1
|
||||
ktor_version=1.1.4
|
||||
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
|
||||
|
@ -2,6 +2,7 @@ package com.github.insanusmokrassar.PsychomatrixBase.utils.CeilDescriptions
|
||||
|
||||
import com.github.insanusmokrassar.PsychomatrixBase.utils.CeilDescriptions.models.CeilsInfosRoot
|
||||
import com.github.insanusmokrassar.PsychomatrixBase.utils.FilesLoader.load
|
||||
import com.github.insanusmokrassar.PsychomatrixBase.utils.nonstrictJson
|
||||
import kotlinx.serialization.json.Json
|
||||
import java.io.InputStreamReader
|
||||
|
||||
@ -27,6 +28,6 @@ private fun findSubTranslation(language: String): String {
|
||||
|
||||
fun resolveCeilsDescriptionsByLanguage(language: String = "en_US"): CeilsInfosRoot {
|
||||
return load("$characteristicsFolder/${findSubTranslation(language)}.json").let {
|
||||
Json.nonstrict.parse(CeilsInfosRoot.serializer(), InputStreamReader(it).readText())
|
||||
nonstrictJson.decodeFromString(CeilsInfosRoot.serializer(), InputStreamReader(it).readText())
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.github.insanusmokrassar.PsychomatrixBase.utils.CeilDescriptions.models
|
||||
|
||||
import com.github.insanusmokrassar.PsychomatrixBase.domain.entities.CeilInfo
|
||||
import kotlinx.serialization.Optional
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
|
@ -0,0 +1,8 @@
|
||||
package com.github.insanusmokrassar.PsychomatrixBase.utils
|
||||
|
||||
import kotlinx.serialization.json.Json
|
||||
|
||||
val nonstrictJson = Json {
|
||||
ignoreUnknownKeys = true
|
||||
allowSpecialFloatingPointValues = true
|
||||
}
|
Loading…
Reference in New Issue
Block a user