Skip to content

3.x: Upgrade to Gradle 8.14, toolchains, Central release #7868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 19, 2025
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/gradle_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: 'zulu'
java-version: '8'
java-version: '11'
- name: Cache Gradle packages
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/gradle_jdk11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
permissions:
contents: read

env:
BUILD_WITH_11: true

jobs:
build:

Expand All @@ -35,5 +38,5 @@ jobs:
run: ./gradlew -PjavaCompatibility=9 jar
- name: Build RxJava
run: ./gradlew build --stacktrace
- name: Generate Javadoc
run: ./gradlew javadoc --stacktrace
# - name: Generate Javadoc
# run: ./gradlew javadoc --stacktrace
4 changes: 2 additions & 2 deletions .github/workflows/gradle_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: 'zulu'
java-version: '8'
java-version: '11'
- name: Cache Gradle packages
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gradle_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
CI_BUILD_NUMBER: ${{ github.run_number }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: 'zulu'
java-version: '8'
java-version: '11'
- name: Cache Gradle packages
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
Expand All @@ -54,7 +54,7 @@ jobs:
ORG_GRADLE_PROJECT_SIGNING_PRIVATE_KEY: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
- name: Publish release
run: ./gradlew -PreleaseMode=full closeAndReleaseRepository --no-daemon --no-parallel --stacktrace
run: ./gradlew -PreleaseMode=full publishAndReleaseToMavenCentral --no-configuration-cache --no-daemon --no-parallel --stacktrace
env:
# Define secrets at https://github.com/ReactiveX/RxJava/settings/secrets/actions
# ------------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gradle_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
CI_BUILD_NUMBER: ${{ github.run_number }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: 'zulu'
java-version: '8'
java-version: '11'
- name: Cache Gradle packages
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Build RxJava
run: ./gradlew build --stacktrace --no-daemon
- name: Upload Snapshot
run: ./gradlew -PreleaseMode=branch publish --no-daemon --no-parallel --stacktrace
run: ./gradlew -PreleaseMode=branch publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel --stacktrace
env:
# Define secrets at https://github.com/ReactiveX/RxJava/settings/secrets/actions
# ------------------------------------------------------------------------------
Expand Down
54 changes: 21 additions & 33 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ plugins {
id("me.champeau.gradle.jmh") version "0.5.3"
id("com.github.hierynomus.license") version "0.16.1"
id("biz.aQute.bnd.builder") version "6.4.0"
id("com.vanniktech.maven.publish") version "0.19.0"
id("org.beryx.jar") version "1.2.0"
id("com.vanniktech.maven.publish") version "0.32.0"
id("org.beryx.jar") version "2.0.0"
}

ext {
Expand Down Expand Up @@ -49,7 +49,16 @@ dependencies {
testImplementation "com.google.guava:guava:$guavaVersion"
}

def buildWith11 = System.getenv("BUILD_WITH_11")
java {
toolchain {
vendor = JvmVendorSpec.ADOPTIUM
if ("true".equals(buildWith11)) {
languageVersion = JavaLanguageVersion.of(11)
} else {
languageVersion = JavaLanguageVersion.of(8)
}
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -86,12 +95,18 @@ animalsniffer {
annotation = "io.reactivex.rxjava3.internal.util.SuppressAnimalSniffer"
}

moduleConfig {
moduleInfoPath = 'src/main/module/module-info.java'
multiReleaseVersion = 9
}

jar {
from('.') {
include 'LICENSE'
include 'COPYRIGHT'
into('META-INF/')
}
exclude("module-info.class")

// Cover for bnd still not supporting MR Jars: https://github.com/bndtools/bnd/issues/2227
bnd('-fixupmessages': '^Classes found in the wrong directory: \\\\{META-INF/versions/9/module-info\\\\.class=module-info}$')
Expand All @@ -106,8 +121,6 @@ jar {
"Bundle-SymbolicName": "io.reactivex.rxjava3.rxjava",
"Multi-Release": "true"
)

moduleInfoPath = 'src/main/module/module-info.java'
}

license {
Expand Down Expand Up @@ -166,8 +179,9 @@ jacocoTestReport {
dependsOn testNG

reports {
xml.enabled = true
html.enabled = true
xml.required.set(true)
csv.required.set(false)
html.required.set(true)
}
}

Expand All @@ -179,44 +193,18 @@ checkstyle {
"checkstyle.suppressions.file": project.file("config/checkstyle/suppressions.xml"),
"checkstyle.header.file" : project.file("config/license/HEADER_JAVA")
]
checkstyleMain.exclude '**/module-info.java'
}

if (project.hasProperty("releaseMode")) {
logger.lifecycle("ReleaseMode: {}", project.releaseMode)

/*
if ("branch" == project.releaseMode) {

if (version.endsWith("-SNAPSHOT")) {
publishing {
repositories {
maven {
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}
}
}

mavenPublish {
nexus {
stagingProfile = "io.reactivex"
}
}
}
}
*/

if ("full" == project.releaseMode) {
signing {
if (project.hasProperty("SIGNING_PRIVATE_KEY") && project.hasProperty("SIGNING_PASSWORD")) {
useInMemoryPgpKeys(project.getProperty("SIGNING_PRIVATE_KEY"), project.getProperty("SIGNING_PASSWORD"))
}
}
/*
mavenPublish {
nexus {
stagingProfile = "io.reactivex"
}
}
*/
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ POM_DEVELOPER_ID=akarnokd
POM_DEVELOPER_NAME=David Karnok
POM_DEVELOPER_URL=https://github.com/akarnokd/
[email protected]

SONATYPE_HOST=CENTRAL_PORTAL
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-7.6.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading