Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci-netty-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v5
- name: Set up JDK ${{ matrix.java }}
- name: Set up JDK 21 (Gradle Execution)
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
java-version: 21
distribution: 'zulu'
cache: 'gradle'
- name: Print JDK Version
Expand All @@ -37,6 +37,8 @@ jobs:
- name: Clean Gradle project
run: ./gradlew --parallel clean
- name: Build and Test
env:
ORG_GRADLE_PROJECT_testJavaVersion: ${{ matrix.java }}
run: sudo -E env "PATH=$PATH" bash -c "ulimit -l 65536 && ulimit -a && ./gradlew --no-daemon --parallel test"
- name: Publish Test Results
if: always()
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/ci-prb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- '**.txt'
jobs:
build:
name: JDK ${{ matrix.java }} ${{ matrix.os_label }}
name: JDK ${{ matrix.java }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -27,16 +27,20 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v5
- name: Set up JDK ${{ matrix.java }}
- name: Set up JDKs 17 and ${{ matrix.java }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
java-version: |
${{ matrix.java }}
17
distribution: 'zulu'
cache: 'gradle'
- name: Print JDK Version
run: java -version
- name: Make gradlew Executable
run: chmod +x gradlew
- name: List Java Toolchains
run: ./gradlew --no-daemon -q javaToolchains
- name: Clean Gradle project
run: ./gradlew --parallel clean
# https://github.community/t/error-the-paging-file-is-too-small-for-this-operation-to-complete/17141
Expand All @@ -51,11 +55,15 @@ jobs:
if: runner.os == 'Linux'
env:
JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
run: sudo -E env "PATH=$PATH" bash -c "ulimit -l 65536 && ulimit -a && ./gradlew --no-daemon --parallel test"
ORG_GRADLE_PROJECT_testJavaVersion: ${{ matrix.java }}
run: |
sudo -E env "PATH=$PATH" bash -c "ulimit -l 65536 && ulimit -a"
./gradlew --no-daemon --parallel test
- name: Build and Test (non-Linux)
if: runner.os != 'Linux'
env:
JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
ORG_GRADLE_PROJECT_testJavaVersion: ${{ matrix.java }}
run: ./gradlew --no-daemon --parallel test
- name: Upload Test Results
if: always()
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/ci-prq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v5
- name: Set up JDK ${{ matrix.java }}
- name: Set up JDKs 17 and ${{ matrix.java }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
java-version: |
${{ matrix.java }}
17
distribution: 'zulu'
cache: 'gradle'
- name: Print JDK Version
Expand All @@ -37,6 +39,8 @@ jobs:
- name: Clean Gradle project
run: ./gradlew --parallel clean
- name: Build with Gradle
env:
ORG_GRADLE_PROJECT_testJavaVersion: ${{ matrix.java }}
run: ./gradlew --parallel -Pdependency.analysis.print.build.health=true quality
- name: Upload CheckStyle Results
if: always()
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ jobs:
uses: actions/checkout@v5
- name: Check NO SNAPSHOT version suffix
run: if [[ $(cat gradle.properties | grep version= | sed 's/^version=//') =~ .*-SNAPSHOT ]]; then exit 1; else exit 0; fi
- name: Set up JDK ${{ matrix.java }}
- name: Set up JDKs 17 and ${{ matrix.java }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
java-version: |
${{ matrix.java }}
17
distribution: 'zulu'
cache: 'gradle'
- name: Print JDK Version
Expand All @@ -35,6 +37,7 @@ jobs:
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
ORG_GRADLE_PROJECT_testJavaVersion: ${{ matrix.java }}
run: |
# Build arguments to feed to the single gradlew publish command
if [ "${{ matrix.java }}" = "8" ]; then
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ci-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ jobs:
uses: actions/checkout@v5
- name: Check SNAPSHOT version suffix
run: if [[ $(cat gradle.properties | grep version= | sed 's/^version=//') =~ .*-SNAPSHOT ]]; then exit 0; else exit 1; fi
- name: Set up JDK ${{ matrix.java }}
- name: Set up JDKs 17 and ${{ matrix.java }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
java-version: |
${{ matrix.java }}
17
distribution: 'zulu'
cache: 'gradle'
- name: Print JDK Version
Expand All @@ -45,6 +47,7 @@ jobs:
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
ORG_GRADLE_PROJECT_testJavaVersion: ${{ matrix.java }}
run: |
# Build arguments to feed to the single gradlew publish command
if [ "${{ matrix.java }}" = "8" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '11'
java-version: '17'
distribution: 'zulu'
cache: 'gradle'
- name: Print JDK Version
Expand Down
79 changes: 34 additions & 45 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,55 +50,54 @@ buildscript {
}
}
dependencies {
if (JavaVersion.current().isJava11Compatible()) {
classpath("com.autonomousapps:dependency-analysis-gradle-plugin:$dependencyAnalysisPluginVersion")
}
// With toolchains, the dependency analysis plugin can always be applied since Gradle runs on JDK 17+
classpath("com.autonomousapps:dependency-analysis-gradle-plugin:$dependencyAnalysisPluginVersion")
}
}

apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-root"

// Unfortunately, we can not make this validation part of our servicetalk-gradle-plugin-internal because it requires
// JDK11 while we build and package our plugin with JDK8.
if (JavaVersion.current().isJava11Compatible()) {
apply plugin: "com.autonomousapps.dependency-analysis"
// With toolchains, Gradle always runs on JDK 17+ so dependency analysis can always be applied
apply plugin: "com.autonomousapps.dependency-analysis"

dependencyAnalysis {
issues {
all {
onAny {
severity("fail")
}
onUnusedDependencies {
// We use it for log4j2.xml configuration
exclude(":servicetalk-test-resources")
}
onUsedTransitiveDependencies {
// We import it as api dependency via :servicetalk-annotations
exclude("com.google.code.findbugs:jsr305")
}
onIncorrectConfiguration {
// We import it as api dependency via :servicetalk-annotations
exclude("com.google.code.findbugs:jsr305")
}
dependencyAnalysis {
issues {
all {
onAny {
severity("fail")
}
onUnusedDependencies {
// We use it for log4j2.xml configuration
exclude(":servicetalk-test-resources")
}
onUsedTransitiveDependencies {
// We import it as api dependency via :servicetalk-annotations
exclude("com.google.code.findbugs:jsr305")
}
onIncorrectConfiguration {
// We import it as api dependency via :servicetalk-annotations
exclude("com.google.code.findbugs:jsr305")
}
}
}

quality.dependsOn buildHealth
}

quality.dependsOn buildHealth

task validateLocalDocSite(type: Exec) {
group 'Documentation'
description 'Generate and validate servicetalk.io site documentation'
group = 'Documentation'
description = 'Generate and validate servicetalk.io site documentation'
workingDir 'docs/generation'
commandLine './gradlew', 'clean', 'validateLocalSite'
}
quality.dependsOn validateLocalDocSite

subprojects {
// mockito 5 only supports jdk11+
if (JavaVersion.current() < JavaVersion.VERSION_11) {
// mockito 5 only supports jdk11+, but with toolchains we check the toolchain version, not Gradle's JVM
def toolchainVersion = project.hasProperty('testJavaVersion')
? Integer.parseInt(project.property('testJavaVersion').toString())
: 8
if (toolchainVersion < 11) {
project.setProperty("mockitoCoreVersion", mockitoCorePreJdk11Version)
} else {
apply plugin: "com.autonomousapps.dependency-analysis"
Expand All @@ -119,20 +118,10 @@ subprojects {
lockMode = LockMode.STRICT
}

configurations {
annotationProcessor {
resolutionStrategy.activateDependencyLocking()
}
compileClasspath {
resolutionStrategy.activateDependencyLocking()
}
runtimeClasspath {
resolutionStrategy.activateDependencyLocking()
}
jmhCompileClasspath {
resolutionStrategy.activateDependencyLocking()
}
jmhRuntimeClasspath {
def lockableConfigs = ["annotationProcessor", "compileClasspath", "runtimeClasspath", "jmhCompileClasspath",
"jmhRuntimeClasspath"]
configurations.configureEach {
if (lockableConfigs.contains(it.name)) {
resolutionStrategy.activateDependencyLocking()
}
}
Expand Down
Binary file modified docs/generation/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/generation/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 1 addition & 4 deletions docs/generation/gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH="\\\"\\\""


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )

JAVACMD=$( cygpath --unix "$JAVACMD" )

Expand Down Expand Up @@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

Expand Down
3 changes: 1 addition & 2 deletions docs/generation/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ goto fail
:execute
@rem Setup the command line

set CLASSPATH=


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.java.installations.auto-download=false
org.gradle.java.installations.auto-detect=true
org.gradle.jvmargs=-Xms2g -Xmx4g -dsa -da -ea:io.servicetalk... -XX:+HeapDumpOnOutOfMemoryError

# project metadata used for publications
Expand Down Expand Up @@ -84,7 +85,7 @@ protobufGradlePluginVersion=0.9.5
protobufVersion=3.25.5
protoGoogleCommonProtosVersion=2.29.0
javaPoetVersion=1.13.0
shadowPluginVersion=8.1.1
shadowPluginVersion=8.3.9

# resilience4j - jdk8 compat
resilience4jVersion=1.7.1
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 1 addition & 4 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH="\\\"\\\""


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )

JAVACMD=$( cygpath --unix "$JAVACMD" )

Expand Down Expand Up @@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

Expand Down
3 changes: 1 addition & 2 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ goto fail
:execute
@rem Setup the command line

set CLASSPATH=


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
2 changes: 1 addition & 1 deletion servicetalk-benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

plugins {
id "com.github.johnrengelman.shadow" version "$shadowPluginVersion"
id "com.gradleup.shadow" version "$shadowPluginVersion"
id "me.champeau.jmh" version "$jmhPluginVersion"
}

Expand Down
Loading
Loading