Skip to content

Commit

Permalink
Update versions:
Browse files Browse the repository at this point in the history
* Kotlin 1.9.20
* gradle 8.4
* 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 df91579
Show file tree
Hide file tree
Showing 24 changed files with 74 additions and 82 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
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ 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.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 13 additions & 9 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,26 +131,29 @@ 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.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -198,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
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
Loading

0 comments on commit df91579

Please sign in to comment.