Kotlin 1.3.41 and some dependency upgrades

parent 929325cc
Pipeline #8741 passed with stages
in 5 minutes and 41 seconds
......@@ -7,8 +7,8 @@ if (!JavaVersion.current().isJava8Compatible)
error("Only JDK 8 or newer is supported!")
plugins {
kotlin("jvm") version "1.3.40"
id("kotlinx-serialization") version "1.3.40"
kotlin("jvm") version "1.3.41"
id("kotlinx-serialization") version "1.3.41"
id("org.jetbrains.dokka") version "0.9.18"
}
......@@ -18,7 +18,7 @@ repositories {
}
val ktorVersion = "1.2.2"
val junitVersion = "5.4.2"
val junitVersion = "5.5.0"
val aspectjVersion = "1.9.4"
dependencies {
......@@ -59,7 +59,7 @@ dependencies {
implementation("io.ktor", "ktor-freemarker", ktorVersion)
// http4k WebSocket client library
implementation("org.http4k", "http4k-client-websocket", "3.157.1")
implementation("org.http4k", "http4k-client-websocket", "3.162.0")
// AspectJ runtime
runtimeOnly("org.aspectj", "aspectjrt", aspectjVersion)
......@@ -71,7 +71,7 @@ dependencies {
testImplementation("org.junit.jupiter", "junit-jupiter-params", junitVersion)
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", junitVersion)
testImplementation("org.mockito", "mockito-junit-jupiter", "2.28.2")
testImplementation("org.mockito", "mockito-junit-jupiter", "3.0.0")
}
version = "2.0.3"
......
......@@ -14,6 +14,7 @@ import jani.interaction.tasks.analyse.messages.StartAnalysisTask
import org.http4k.client.WebsocketClient
import org.http4k.core.Uri
import org.http4k.websocket.WsMessage
import org.http4k.websocket.WsStatus
import java.io.File
import java.util.concurrent.BrokenBarrierException
import java.util.concurrent.CountDownLatch
......@@ -73,8 +74,8 @@ internal object PseuCoDRD {
initializeConnection()
val model = AnyModel.Textual(
file.nameWithoutExtension,
AnyModel.Textual.Part(file.name, "source", file.readText())
file.nameWithoutExtension,
AnyModel.Textual.Part(file.name, "source", file.readText())
)
connection.startAnalysisBlocking(model)
......@@ -222,14 +223,14 @@ internal object PseuCoDRD {
breakConnection("ID not matching.")
var providesValidEngine = false
it.engines.forEach {
it.engines.forEach { engine ->
var foundDRD = false
var supportsPseuCo = false
if (it.id.plainString == "DRD")
if (engine.id.plainString == "DRD")
foundDRD = true
if (it.modellingFormalisms.let { it != null && ModellingFormalism.new("x-pseuco") in it })
if (engine.modellingFormalisms.let { it != null && ModellingFormalism.new("x-pseuco") in it })
supportsPseuCo = true
if (foundDRD && supportsPseuCo) {
......@@ -337,4 +338,14 @@ internal object PseuCoDRD {
throw error!!
}
}
/**
* Closes the underlying [connection] (if previously established).
*
* @author Konstantin Kopper
*/
fun leave() {
if (::connection.isInitialized)
connection.socket.close(WsStatus.GOING_AWAY)
}
}
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