Skip to content

Commit 2239c5c

Browse files
authored
Update versions, use newer APIs, enable Gradle configuration cache (#251)
* Gradle 8.6 * Kotlin 1.9.22 * Coroutines 1.8.0 * use kotlinx-coroutines-test module * replace deprecated on native currentMillis
1 parent 61459a6 commit 2239c5c

File tree

32 files changed

+131
-171
lines changed

32 files changed

+131
-171
lines changed

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2015-2023 the original author or authors.
2+
# Copyright 2015-2024 the original author or authors.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -16,13 +16,13 @@
1616
group=io.rsocket.kotlin
1717
version=0.16.0-SNAPSHOT
1818
#Kotlin
19-
kotlin.js.compiler=ir
2019
kotlin.native.ignoreIncorrectDependencies=true
2120
kotlinx.atomicfu.enableJvmIrTransformation=true
2221
kotlinx.atomicfu.enableJsIrTransformation=true
22+
kotlinx.atomicfu.enableNativeIrTransformations=true
2323
#Gradle
24+
org.gradle.jvmargs=-Xmx2g
2425
org.gradle.parallel=true
2526
org.gradle.caching=true
27+
org.gradle.configuration-cache=true
2628
org.gradle.configureondemand=true
27-
org.gradle.jvmargs=-Xmx2g
28-
org.gradle.vfs.watch=true

gradle/libs.updates.gradle.kts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2023 the original author or authors.
2+
* Copyright 2015-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
1616

1717
/**
1818
* run to check for dependencies:
19-
* ./gradlew :dependencyUpdates --init-script gradle/libs.updates.gradle.kts --no-configure-on-demand
19+
* ./gradlew dependencyUpdates --init-script gradle/libs.updates.gradle.kts --no-configuration-cache
2020
*/
2121

2222
initscript {
@@ -28,12 +28,9 @@ initscript {
2828
}
2929
}
3030

31-
allprojects {
32-
println("Project: $name / ${rootProject.name}")
31+
rootProject {
3332
apply<com.github.benmanes.gradle.versions.VersionsPlugin>()
34-
35-
// for root project add dependency on included builds
36-
if (name == "rsocket-kotlin") tasks.named("dependencyUpdates") {
33+
tasks.named("dependencyUpdates") {
3734
gradle.includedBuilds.forEach {
3835
dependsOn(it.task(":dependencyUpdates"))
3936
}

gradle/libs.versions.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
[versions]
2-
kotlinx-atomicfu = "0.20.2"
3-
kotlinx-coroutines = "1.6.4" #1.7.0 needs ktor with 1.7.0...
2+
kotlinx-atomicfu = "0.23.2"
3+
kotlinx-coroutines = "1.8.0"
44
kotlinx-benchmark = "0.4.8"
5-
kotlinx-bcv = "0.13.1"
5+
kotlinx-bcv = "0.14.0"
66

7-
ktor = "2.3.0"
7+
ktor = "2.3.8"
88

9-
turbine = "0.12.3" #0.13.0 needs coroutines 1.7.0
9+
turbine = "1.0.0"
1010

1111
rsocket-java = "1.1.3"
1212

1313
jmh = "1.36"
1414

1515
[libraries]
1616
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
17+
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
1718
kotlinx-coroutines-reactor = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", version.ref = "kotlinx-coroutines" }
1819

1920
kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "kotlinx-atomicfu" }

gradle/plugins/build-logic/src/main/kotlin/rsocket.multiplatform.gradle.kts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2023 the original author or authors.
2+
* Copyright 2015-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,8 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import org.jetbrains.kotlin.gradle.*
18-
1917
plugins {
2018
kotlin("multiplatform")
2119
id("build-parameters")
@@ -24,9 +22,6 @@ plugins {
2422
kotlin {
2523
jvmToolchain(8)
2624

27-
@OptIn(ExperimentalKotlinGradlePluginApi::class)
28-
targetHierarchy.default()
29-
3025
targets.configureEach {
3126
compilations.configureEach {
3227
compilerOptions.configure {
@@ -44,6 +39,5 @@ kotlin {
4439
}
4540

4641
val buildParameters = the<buildparameters.BuildParametersExtension>()
47-
48-
tasks.matching { it.name.endsWith("test", ignoreCase = true) }.configureEach { onlyIf { !buildParameters.skip.test } }
49-
tasks.matching { it.name.startsWith("link", ignoreCase = true) }.configureEach { onlyIf { !buildParameters.skip.link } }
42+
if (buildParameters.skip.test) tasks.matching { it.name.endsWith("test", ignoreCase = true) }.configureEach { onlyIf { false } }
43+
if (buildParameters.skip.link) tasks.matching { it.name.startsWith("link", ignoreCase = true) }.configureEach { onlyIf { false } }

gradle/plugins/kotlin-version-catalog/src/main/kotlin/kotlin-version-catalog.settings.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2023 the original author or authors.
2+
* Copyright 2015-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ plugins {
1818
id("build-parameters")
1919
}
2020

21-
val kotlinVersion = "1.8.21"
21+
val kotlinVersion = "1.9.22"
2222
val kotlinVersionOverride = the<buildparameters.BuildParametersExtension>().useKotlin.orNull?.takeIf(String::isNotBlank)
2323

2424
if (kotlinVersionOverride != null) logger.lifecycle("Kotlin version override: $kotlinVersionOverride")

gradle/wrapper/gradle-wrapper.jar

-18.2 KB
Binary file not shown.
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1+
#
2+
# Copyright 2015-2024 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
117
distributionBase=GRADLE_USER_HOME
218
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
19+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
420
networkTimeout=10000
21+
validateDistributionUrl=true
522
zipStoreBase=GRADLE_USER_HOME
623
zipStorePath=wrapper/dists

gradlew

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright 2015-2024 the original author or authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
88
# You may obtain a copy of the License at
99
#
10-
# https://www.apache.org/licenses/LICENSE-2.0
10+
# http://www.apache.org/licenses/LICENSE-2.0
1111
#
1212
# Unless required by applicable law or agreed to in writing, software
1313
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -130,26 +131,29 @@ location of your Java installation."
130131
fi
131132
else
132133
JAVACMD=java
133-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134137
135138
Please set the JAVA_HOME variable in your environment to match the
136139
location of your Java installation."
140+
fi
137141
fi
138142

139143
# Increase the maximum file descriptors if we can.
140144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
141145
case $MAX_FD in #(
142146
max*)
143147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
144-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
145149
MAX_FD=$( ulimit -H -n ) ||
146150
warn "Could not query maximum file descriptor limit"
147151
esac
148152
case $MAX_FD in #(
149153
'' | soft) :;; #(
150154
*)
151155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
152-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
153157
ulimit -n "$MAX_FD" ||
154158
warn "Could not set maximum file descriptor limit to $MAX_FD"
155159
esac
@@ -198,11 +202,11 @@ fi
198202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
199203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
200204

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

207211
set -- \
208212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

gradlew.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

rsocket-core/api/rsocket-core.api

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ public final class io/rsocket/kotlin/core/WellKnownMimeType : java/lang/Enum, io
315315
public static final field VideoH264 Lio/rsocket/kotlin/core/WellKnownMimeType;
316316
public static final field VideoH265 Lio/rsocket/kotlin/core/WellKnownMimeType;
317317
public static final field VideoVp8 Lio/rsocket/kotlin/core/WellKnownMimeType;
318+
public static fun getEntries ()Lkotlin/enums/EnumEntries;
318319
public fun getIdentifier ()B
319320
public fun getText ()Ljava/lang/String;
320321
public fun toString ()Ljava/lang/String;
@@ -383,6 +384,7 @@ public final class io/rsocket/kotlin/logging/LoggingLevel : java/lang/Enum {
383384
public static final field INFO Lio/rsocket/kotlin/logging/LoggingLevel;
384385
public static final field TRACE Lio/rsocket/kotlin/logging/LoggingLevel;
385386
public static final field WARN Lio/rsocket/kotlin/logging/LoggingLevel;
387+
public static fun getEntries ()Lkotlin/enums/EnumEntries;
386388
public static fun valueOf (Ljava/lang/String;)Lio/rsocket/kotlin/logging/LoggingLevel;
387389
public static fun values ()[Lio/rsocket/kotlin/logging/LoggingLevel;
388390
}
@@ -581,6 +583,7 @@ public final class io/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind : java/
581583
public static final field NotSampled Lio/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind;
582584
public static final field Sample Lio/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind;
583585
public static final field Unspecified Lio/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind;
586+
public static fun getEntries ()Lkotlin/enums/EnumEntries;
584587
public static fun valueOf (Ljava/lang/String;)Lio/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind;
585588
public static fun values ()[Lio/rsocket/kotlin/metadata/ZipkinTracingMetadata$Kind;
586589
}
@@ -728,6 +731,7 @@ public final class io/rsocket/kotlin/metadata/security/WellKnowAuthType : java/l
728731
public static final field Bearer Lio/rsocket/kotlin/metadata/security/WellKnowAuthType;
729732
public static final field Companion Lio/rsocket/kotlin/metadata/security/WellKnowAuthType$Companion;
730733
public static final field Simple Lio/rsocket/kotlin/metadata/security/WellKnowAuthType;
734+
public static fun getEntries ()Lkotlin/enums/EnumEntries;
731735
public fun getIdentifier ()B
732736
public fun getText ()Ljava/lang/String;
733737
public fun toString ()Ljava/lang/String;

0 commit comments

Comments
 (0)