Skip to content

Commit

Permalink
build.gradle -> build.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Vasco committed Oct 8, 2024
1 parent 298480c commit 6eab989
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 96 deletions.
59 changes: 0 additions & 59 deletions build.gradle

This file was deleted.

26 changes: 26 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
plugins {
kotlin("jvm") version "2.0.20"
id("org.jetbrains.dokka") version "1.9.20"
}

allprojects {
group = "com.lightstreamer"
version = "0.1.0"

repositories {
mavenCentral()
}
}

subprojects {
apply(plugin = "kotlin")
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.dokka")

version = parent?.version ?: error("Parent version not found")

kotlin {
explicitApi()
jvmToolchain(21)
}
}
14 changes: 0 additions & 14 deletions client/build.gradle

This file was deleted.

12 changes: 12 additions & 0 deletions client/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description = "Lightstreamer client"

dependencies {
api(project(":ls-kotlin-mini-socket"))
testImplementation(kotlin("test"))
testApi("org.slf4j:slf4j-simple:1.7.36")
testApi("org.amshove.kluent:kluent:1.73")
}

tasks.test {
useJUnitPlatform()
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ internal class LightstreamerSessionImpl(
if (lightstreamerServerException != null)
return@runCatching lightstreamerServerException
}
null
return@runCatching null
}

exitResult
.onSuccess { completableExitStatus.complete(it) }
.onFailure { completableExitStatus.completeExceptionally(it) }
.onSuccess(completableExitStatus::complete)
.onFailure(completableExitStatus::completeExceptionally)

// cancel pending tasks
val cause =
Expand Down Expand Up @@ -232,11 +232,8 @@ internal class LightstreamerSessionImpl(
val serverMessage =
if (keepAlive == null) socket.receive()
else withTimeout(keepAlive.inWholeMilliseconds.coerceAtLeast(1)) { socket.receive() }
if (serverMessage.isDataNotification()) {
messageToSkip--
} else {
onServerMessage(serverMessage)
}
if (serverMessage.isDataNotification()) messageToSkip--
else onServerMessage(serverMessage)
}

connectionOk
Expand Down
15 changes: 0 additions & 15 deletions socket/build.gradle

This file was deleted.

13 changes: 13 additions & 0 deletions socket/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description = "TLCP parser"

dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.9.0")
api("io.github.microutils:kotlin-logging-jvm:3.0.5")
testImplementation(kotlin("test"))
testApi("ch.qos.logback:logback-classic:1.2.13")
testApi("org.amshove.kluent:kluent:1.73")
}

tasks.test {
useJUnitPlatform()
}

0 comments on commit 6eab989

Please sign in to comment.