Skip to content

Commit

Permalink
Update versions:
Browse files Browse the repository at this point in the history
* Kotlin 1.9.20
* gradle 8.3
* enable configuration cache
* no info logs on CI
* latest coroutines and ktor
* latest other dependencies
  • Loading branch information
whyoleg committed Nov 12, 2023
1 parent 37315f8 commit 9a09e9f
Show file tree
Hide file tree
Showing 24 changed files with 68 additions and 78 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
arguments: |
publishToMavenLocal
--scan
--info
-Pversion=${{ github.ref_name }}
- name: Publish release to Maven Central (version ${{ github.ref_name }})
Expand All @@ -40,5 +39,4 @@ jobs:
arguments: |
publishAllPublicationsToSonatypeRepository
--scan
--info
-Pversion=${{ github.ref_name }}
2 changes: 0 additions & 2 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
arguments: |
publishToMavenLocal
--scan
--info
-PversionSuffix=${{ steps.set-version.outputs.version-suffix }}
-PgithubUsername=${{ github.actor }}
-PgithubPassword=${{ github.token }}
Expand All @@ -42,7 +41,6 @@ jobs:
arguments: |
publishAllPublicationsToGithubRepository
--scan
--info
-PversionSuffix=${{ steps.set-version.outputs.version-suffix }}
-PgithubUsername=${{ github.actor }}
-PgithubPassword=${{ github.token }}
4 changes: 0 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
jvm17Test
jvm20Test
--scan
--info
--continue
- if: always()
uses: actions/upload-artifact@v3
Expand All @@ -41,7 +40,6 @@ jobs:
jsNodeTest
jsBrowserTest
--scan
--info
--continue
- if: always()
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -74,7 +72,6 @@ jobs:
${{ matrix.target }}Test
${{ matrix.target }}ReleaseTest
--scan
--info
--continue
- if: always()
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -118,6 +115,5 @@ jobs:
build
publishToMavenLocal
--scan
--info
--continue
-Pskip.test
5 changes: 2 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
group=io.rsocket.kotlin
version=0.16.0-SNAPSHOT
#Kotlin
kotlin.js.compiler=ir
kotlin.native.ignoreIncorrectDependencies=true
kotlinx.atomicfu.enableJvmIrTransformation=true
kotlinx.atomicfu.enableJsIrTransformation=true
#Gradle
org.gradle.jvmargs=-Xmx2g
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx2g
org.gradle.vfs.watch=true
org.gradle.configuration-cache=true
9 changes: 3 additions & 6 deletions gradle/libs.updates.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

/**
* run to check for dependencies:
* ./gradlew :dependencyUpdates --init-script gradle/libs.updates.gradle.kts --no-configure-on-demand
* ./gradlew dependencyUpdates --init-script gradle/libs.updates.gradle.kts
*/

initscript {
Expand All @@ -28,12 +28,9 @@ initscript {
}
}

allprojects {
println("Project: $name / ${rootProject.name}")
rootProject {
apply<com.github.benmanes.gradle.versions.VersionsPlugin>()

// for root project add dependency on included builds
if (name == "rsocket-kotlin") tasks.named("dependencyUpdates") {
tasks.named("dependencyUpdates") {
gradle.includedBuilds.forEach {
dependsOn(it.task(":dependencyUpdates"))
}
Expand Down
11 changes: 6 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
[versions]
kotlinx-atomicfu = "0.20.2"
kotlinx-coroutines = "1.6.4" #1.7.0 needs ktor with 1.7.0...
kotlinx-atomicfu = "0.22.0"
kotlinx-coroutines = "1.7.3"
kotlinx-benchmark = "0.4.8"
kotlinx-bcv = "0.13.1"
kotlinx-bcv = "0.13.2"

ktor = "2.3.0"
ktor = "2.3.6"

turbine = "0.12.3" #0.13.0 needs coroutines 1.7.0
turbine = "1.0.0"

rsocket-java = "1.1.3"

jmh = "1.36"

[libraries]
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-reactor = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", version.ref = "kotlinx-coroutines" }

kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "kotlinx-atomicfu" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.*

plugins {
kotlin("multiplatform")
id("build-parameters")
Expand All @@ -24,9 +22,6 @@ plugins {
kotlin {
jvmToolchain(8)

@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()

targets.configureEach {
compilations.configureEach {
compilerOptions.configure {
Expand All @@ -45,5 +40,5 @@ kotlin {

val buildParameters = the<buildparameters.BuildParametersExtension>()

tasks.matching { it.name.endsWith("test", ignoreCase = true) }.configureEach { onlyIf { !buildParameters.skip.test } }
tasks.matching { it.name.startsWith("link", ignoreCase = true) }.configureEach { onlyIf { !buildParameters.skip.link } }
if (buildParameters.skip.test) tasks.matching { it.name.endsWith("test", ignoreCase = true) }.configureEach { onlyIf { false } }
if (buildParameters.skip.link) tasks.matching { it.name.startsWith("link", ignoreCase = true) }.configureEach { onlyIf { false } }
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
id("build-parameters")
}

val kotlinVersion = "1.8.21"
val kotlinVersion = "1.9.20"
val kotlinVersionOverride = the<buildparameters.BuildParametersExtension>().useKotlin.orNull?.takeIf(String::isNotBlank)

if (kotlinVersionOverride != null) logger.lifecycle("Kotlin version override: $kotlinVersionOverride")
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 6 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -130,10 +131,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down
4 changes: 4 additions & 0 deletions rsocket-core/api/rsocket-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ public final class io/rsocket/kotlin/core/WellKnownMimeType : java/lang/Enum, io
public static final field VideoH264 Lio/rsocket/kotlin/core/WellKnownMimeType;
public static final field VideoH265 Lio/rsocket/kotlin/core/WellKnownMimeType;
public static final field VideoVp8 Lio/rsocket/kotlin/core/WellKnownMimeType;
public static fun getEntries ()Lkotlin/enums/EnumEntries;
public fun getIdentifier ()B
public fun getText ()Ljava/lang/String;
public fun toString ()Ljava/lang/String;
Expand Down Expand Up @@ -384,6 +385,7 @@ public final class io/rsocket/kotlin/logging/LoggingLevel : java/lang/Enum {
public static final field INFO Lio/rsocket/kotlin/logging/LoggingLevel;
public static final field TRACE Lio/rsocket/kotlin/logging/LoggingLevel;
public static final field WARN Lio/rsocket/kotlin/logging/LoggingLevel;
public static fun getEntries ()Lkotlin/enums/EnumEntries;
public static fun valueOf (Ljava/lang/String;)Lio/rsocket/kotlin/logging/LoggingLevel;
public static fun values ()[Lio/rsocket/kotlin/logging/LoggingLevel;
}
Expand Down Expand Up @@ -582,6 +584,7 @@ public final class io/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind : java/
public static final field NotSampled Lio/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind;
public static final field Sample Lio/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind;
public static final field Unspecified Lio/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind;
public static fun getEntries ()Lkotlin/enums/EnumEntries;
public static fun valueOf (Ljava/lang/String;)Lio/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind;
public static fun values ()[Lio/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind;
}
Expand Down Expand Up @@ -729,6 +732,7 @@ public final class io/rsocket/kotlin/metadata/security/WellKnowAuthType : java/l
public static final field Bearer Lio/rsocket/kotlin/metadata/security/WellKnowAuthType;
public static final field Companion Lio/rsocket/kotlin/metadata/security/WellKnowAuthType$Companion;
public static final field Simple Lio/rsocket/kotlin/metadata/security/WellKnowAuthType;
public static fun getEntries ()Lkotlin/enums/EnumEntries;
public fun getIdentifier ()B
public fun getText ()Ljava/lang/String;
public fun toString ()Ljava/lang/String;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import kotlinx.coroutines.*
import kotlin.test.*

class ConnectionEstablishmentTest : SuspendTest, TestWithLeakCheck {

@Ignore // TODO
@Test
fun responderRejectSetup() = test {
val errorMessage = "error"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2022 the original author or authors.
* Copyright 2015-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,6 @@

package io.rsocket.kotlin.frame

import io.ktor.util.*
import io.ktor.utils.io.core.*
import io.rsocket.kotlin.*
import io.rsocket.kotlin.test.*
Expand All @@ -31,12 +30,12 @@ class ErrorFrameTest : TestWithLeakCheck {
val frame = ErrorFrame(1, RSocketError.ApplicationError("d"))
val bytes = frame.toPacketWithLength().readBytes()

assertEquals(dump, hex(bytes))
assertEquals(dump, bytes.toHexString())
}

@Test
fun testDecoding() {
val packet = packet(hex(dump))
val packet = packet(dump.hexToByteArray())
val frame = packet.toFrameWithLength()

assertTrue(frame is ErrorFrame)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2022 the original author or authors.
* Copyright 2015-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,6 @@

package io.rsocket.kotlin.frame

import io.ktor.util.*
import io.ktor.utils.io.core.*
import io.rsocket.kotlin.test.*
import kotlin.test.*
Expand All @@ -29,12 +28,12 @@ class KeepAliveFrameTest : TestWithLeakCheck {
val frame = KeepAliveFrame(true, 0, packet("d"))
val bytes = frame.toPacketWithLength().readBytes()

assertEquals(dump, hex(bytes))
assertEquals(dump, bytes.toHexString())
}

@Test
fun testDecoding() {
val packet = packet(hex(dump))
val packet = packet(dump.hexToByteArray())
val frame = packet.toFrameWithLength()

assertTrue(frame is KeepAliveFrame)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2022 the original author or authors.
* Copyright 2015-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,6 @@

package io.rsocket.kotlin.frame

import io.ktor.util.*
import io.ktor.utils.io.core.*
import io.rsocket.kotlin.test.*
import kotlin.test.*
Expand All @@ -30,12 +29,12 @@ class RequestNFrameTest : TestWithLeakCheck {
val frame = RequestNFrame(1, 5)
val bytes = frame.toPacketWithLength().readBytes()

assertEquals(dump, hex(bytes))
assertEquals(dump, bytes.toHexString())
}

@Test
fun testDecoding() {
val packet = packet(hex(dump))
val packet = packet(dump.hexToByteArray())
val frame = packet.toFrameWithLength()

assertTrue(frame is RequestNFrame)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2022 the original author or authors.
* Copyright 2015-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,6 @@

package io.rsocket.kotlin.frame

import io.ktor.util.*
import io.ktor.utils.io.core.*
import io.rsocket.kotlin.payload.*
import io.rsocket.kotlin.test.*
Expand All @@ -30,13 +29,13 @@ class RequestStreamFrameTest : TestWithLeakCheck {
val frame = RequestStreamFrame(1, 1, payload("d", "md"))
val bytes = frame.toPacketWithLength().readBytes()

assertEquals(dump, hex(bytes))
assertEquals(dump, bytes.toHexString())
}

@Test
fun testDecoding() {
val dump = "000010000000011900000000010000026d6464"
val frame = packet(hex(dump)).toFrameWithLength()
val frame = packet(dump.hexToByteArray()).toFrameWithLength()

assertTrue(frame is RequestFrame)
assertEquals(FrameType.RequestStream, frame.type)
Expand All @@ -55,13 +54,13 @@ class RequestStreamFrameTest : TestWithLeakCheck {
val frame = RequestStreamFrame(1, 1, Payload(packet("d"), ByteReadPacket.Empty))
val bytes = frame.toPacketWithLength().readBytes()

assertEquals(dump, hex(bytes))
assertEquals(dump, bytes.toHexString())
}

@Test
fun testDecodingWithEmptyMetadata() {
val dump = "00000e0000000119000000000100000064"
val frame = packet(hex(dump)).toFrameWithLength()
val frame = packet(dump.hexToByteArray()).toFrameWithLength()

assertTrue(frame is RequestFrame)
assertEquals(FrameType.RequestStream, frame.type)
Expand All @@ -80,13 +79,13 @@ class RequestStreamFrameTest : TestWithLeakCheck {
val frame = RequestStreamFrame(1, 1, payload("d"))
val bytes = frame.toPacketWithLength().readBytes()

assertEquals(dump, hex(bytes))
assertEquals(dump, bytes.toHexString())
}

@Test
fun testDecodingWithNullMetadata() {
val dump = "00000b0000000118000000000164"
val frame = packet(hex(dump)).toFrameWithLength()
val frame = packet(dump.hexToByteArray()).toFrameWithLength()

assertTrue(frame is RequestFrame)
assertEquals(FrameType.RequestStream, frame.type)
Expand Down
2 changes: 1 addition & 1 deletion rsocket-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ kotlin {
api(kotlin("test"))
api(projects.rsocketCore)

api(libs.ktor.utils)
api(libs.kotlinx.coroutines.test)
api(libs.turbine)
}
}
Expand Down
Loading

0 comments on commit 9a09e9f

Please sign in to comment.