Kotlin 1.3.60 and some dependency upgrades

parent 6ef39995
Pipeline #14402 passed with stages
in 6 minutes and 8 seconds
......@@ -7,18 +7,17 @@ if (!JavaVersion.current().isJava8Compatible)
error("Only JDK 8 or newer is supported!")
plugins {
kotlin("jvm") version "1.3.50"
id("kotlinx-serialization") version "1.3.50"
kotlin("jvm") version "1.3.60"
kotlin("plugin.serialization") version "1.3.60"
id("org.jetbrains.dokka") version "0.9.18"
}
repositories {
jcenter()
maven { url = uri("https://dl.bintray.com/kotlin/kotlinx") }
}
val ktorVersion = "1.2.3"
val junitVersion = "5.5.1"
val ktorVersion = "1.2.5"
val junitVersion = "5.5.2"
val aspectjVersion = "1.9.4"
dependencies {
......@@ -29,23 +28,23 @@ dependencies {
implementation(kotlin("stdlib-jdk8"))
// Coroutines
implementation("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.3.0")
implementation("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.3.2")
// Kotlin serialization
implementation("org.jetbrains.kotlinx", "kotlinx-serialization-runtime", "0.12.0")
implementation("org.jetbrains.kotlinx", "kotlinx-serialization-runtime", "0.13.0")
// OpenJFX
if (JavaVersion.current().isJava11Compatible) {
for (pkg in listOf("base", "controls", "fxml", "graphics"))
for (os in listOf("linux", "mac", "win"))
implementation("org.openjfx", "javafx-$pkg", "12.0.2", classifier = os)
implementation("org.openjfx", "javafx-$pkg", "13.0.1", classifier = os)
}
// Provides RichText TextAreas. Used for code input area.
implementation("org.fxmisc.richtext", "richtextfx", "0.10.1")
implementation("org.fxmisc.richtext", "richtextfx", "0.10.2")
// Google GSON library for JSON
implementation("com.google.code.gson", "gson", "2.8.5")
implementation("com.google.code.gson", "gson", "2.8.6")
// Apache Commons
implementation("commons-io", "commons-io", "2.6")
......@@ -59,19 +58,19 @@ dependencies {
implementation("io.ktor", "ktor-freemarker", ktorVersion)
// http4k WebSocket client library
implementation("org.http4k", "http4k-client-websocket", "3.177.0")
implementation("org.http4k", "http4k-client-websocket", "3.196.0")
// AspectJ runtime
runtimeOnly("org.aspectj", "aspectjrt", aspectjVersion)
// NOP (no-operation) logger implementation
runtimeOnly("org.slf4j", "slf4j-nop", "1.7.28")
runtimeOnly("org.slf4j", "slf4j-nop", "1.7.29")
testImplementation("org.junit.jupiter", "junit-jupiter-api", junitVersion)
testImplementation("org.junit.jupiter", "junit-jupiter-params", junitVersion)
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", junitVersion)
testImplementation("org.mockito", "mockito-junit-jupiter", "3.0.0")
testImplementation("org.mockito", "mockito-junit-jupiter", "3.1.0")
}
version = "2.0.3"
......@@ -275,8 +274,6 @@ val dokka by tasks.getting(DokkaTask::class) {
externalDocumentationLink {
url = url("https://fxmisc.github.io/richtext/javadoc/${dependencyVersion("richtextfx")}/")
// TODO remove link below after javadoc for newer versions of dependency is available
url = url("https://fxmisc.github.io/richtext/javadoc/0.9.1/")
}
externalDocumentationLink {
......
Subproject commit a7b2f25e15f4e9544e84f9d211e10cc4bbcd0890
Subproject commit 6aa23a3184808fdf1c6ae49c29f500a0c276e5d8
......@@ -2,13 +2,3 @@ rootProject.name = "pseuco-ide"
include("pseuco-java-compiler")
project(":pseuco-java-compiler").projectDir = file("lib/pseuco-java-compiler")
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == "kotlinx-serialization") {
useModule("org.jetbrains.kotlin:kotlin-serialization:${requested.version}")
}
}
}
}
......@@ -69,7 +69,7 @@ object JaniJSONAdapter {
* @since 2.0.0
* @throws JsonParseException The given JSON does not describe a [JaniMessage].
*/
fun deserializeMessage(text: String): JaniMessage = JsonParser().parse(text).let {
fun deserializeMessage(text: String): JaniMessage = JsonParser.parseString(text).let {
assert(it.isJsonObject)
jsonBuilder.fromJson(it, when (it.asJsonObject["type"]?.asString) {
// Basic messages
......
......@@ -78,7 +78,7 @@ internal class JaniJSONAdapterTest {
val msg = Authenticate(listOf(1, 42), listOf(Extension.PersistentState), "John Doe", "secret")
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject)
it.asJsonObject
}
......@@ -140,7 +140,7 @@ internal class JaniJSONAdapterTest {
val msg = Capabilities(1, null, metadata, null, listOf("analyse", "transform"))
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject)
it.asJsonObject
}
......@@ -161,7 +161,7 @@ internal class JaniJSONAdapterTest {
fun testCapabilitiesSerialize2() {
val msg = Capabilities(42, listOf(Extension.PersistentState), metadata, listOf(), listOf("analyse", "transform"))
val jsonObject = JsonParser().parse(JaniJSONAdapter.serialize(msg)).let {
val jsonObject = JsonParser.parseString(JaniJSONAdapter.serialize(msg)).let {
assertTrue(it.isJsonObject, "Expected a JSON object")
it.asJsonObject
}
......@@ -245,7 +245,7 @@ internal class JaniJSONAdapterTest {
val msg = Close("Just a test")
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject, "Expected a JSON object")
it.asJsonObject
}
......@@ -289,7 +289,7 @@ internal class JaniJSONAdapterTest {
val msg = RequestUpdateServerParameters(42, emptyList())
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject, "Expected a JSON object")
it.asJsonObject
}
......@@ -312,7 +312,7 @@ internal class JaniJSONAdapterTest {
val msg = RequestUpdateServerParameters(1, listOf(parameterValue))
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject, "Expected a JSON object")
it.asJsonObject
}
......@@ -368,7 +368,7 @@ internal class JaniJSONAdapterTest {
val msg = ReplyUpdateServerParameters(42)
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject)
it.asJsonObject
}
......@@ -402,7 +402,7 @@ internal class JaniJSONAdapterTest {
val msg = ReplyUpdateServerParameters(24, "Your parameters suck.")
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject)
it.asJsonObject
}
......@@ -479,7 +479,7 @@ internal class JaniJSONAdapterTest {
val msg = ProvideTaskStatus(42, "Running...")
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject, "Expected a JSON object")
it.asJsonObject
}
......@@ -527,7 +527,7 @@ internal class JaniJSONAdapterTest {
val msg = ProvideTaskProgress(42, .75)
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject, "Expected a JSON object")
it.asJsonObject
}
......@@ -575,7 +575,7 @@ internal class JaniJSONAdapterTest {
val msg = ProvideTaskMessage(814, ProvideTaskMessage.Severity.ERROR, "Something went wrong")
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject, "Expected a JSON object")
it.asJsonObject
}
......@@ -631,7 +631,7 @@ internal class JaniJSONAdapterTest {
val msg = StopTask(987)
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject, "Expected a JSON object")
it.asJsonObject
}
......@@ -669,7 +669,7 @@ internal class JaniJSONAdapterTest {
val msg = TaskEnded(42)
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject, "Expected a JSON object")
it.asJsonObject
}
......@@ -709,7 +709,7 @@ internal class JaniJSONAdapterTest {
val msg = QueryAnalysisEngines(735)
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject, "Expected a JSON object")
it.asJsonObject
}
......@@ -747,7 +747,7 @@ internal class JaniJSONAdapterTest {
val msg = ReplyAnalysisEngines(471, listOf(analysisEngine))
val str = JaniJSONAdapter.serialize(msg)
val jsonObject = JsonParser().parse(str).let {
val jsonObject = JsonParser.parseString(str).let {
assertTrue(it.isJsonObject, "Expected a JSON object")
it.asJsonObject
}
......@@ -873,8 +873,7 @@ internal class JaniJSONAdapterTest {
assertEquals(parameterValue.identifier.plainString, jsonObject["id"].asString, "Invalid 'id' attribute")
}, {
assertTrue("value" in jsonObject, "Missing 'value' attribute")
val value = parameterValue.value // Required to allow smart casts
when (value) {
when (val value = parameterValue.value) { // Required to allow smart casts
is ParameterValue.Values.True -> jsonObject["value"].also {
assertTrue(it.isJsonPrimitive && it.asJsonPrimitive.isBoolean, "Invalid 'value' attribute: expected a boolean value")
assertTrue(it.asBoolean, "Invalid 'value' attribute")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment