Release Process - rahul-lohra/Snorkl GitHub Wiki

Release Process

To release for kotlin 1.9.+

Step 1:

Comment out the usage of alias(libs.plugins.kotlin.compose)

Step 2:

In libs.versions.toml set these values

kotlin = "1.9.25"
kotlinxSerializationJson = "1.6.3"
ktorServerCore = "2.3.13"

Step 3:

Use this code snippet

//File app/build.gradle.kts
composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }
//File networkmonitor/WebSocketServerManager.kt
import io.ktor.server.application.call
import kotlinx.serialization.encodeToString

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
    pingPeriod = java.time.Duration.ofSeconds(15)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
    timeout = java.time.Duration.ofSeconds(30)
}
// /File networkmonitor/build.gradle.kts
   configurations.all {
        resolutionStrategy.force(
            "org.jetbrains.kotlin:kotlin-stdlib-common:1.9.25", // Replace with your desired 1.9.x version
            "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.25",   // If you are using JDK 8 stdlib
            "org.jetbrains.kotlin:kotlin-stdlib:1.9.25"      // If you are using the platform stdlib
        )
    }

To release for kotlin 2.+

Step 1:

Uncomment out the usage of alias(libs.plugins.kotlin.compose)

Step 2:

In libs.versions.toml set these values kotlin = "2.0.20" and ktorServerCore = "3.1.2"

Step 3:

Code snippets to use

//File networkmonitor/WebSocketServerManager.kt
pingPeriod = 15.seconds
timeout = 30.seconds
//Remove these
configurations.all {
    resolutionStrategy.force(
        "org.jetbrains.kotlin:kotlin-stdlib-common:1.9.25", // Replace with your desired 1.9.x version
        "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.25",   // If you are using JDK 8 stdlib
        "org.jetbrains.kotlin:kotlin-stdlib:1.9.25"      // If you are using the platform stdlib
    )
}
kotlin = "2.0.20"
kotlinxSerializationJson = "1.8.1"
ktorServerCore = "3.1.2"