Skip to content

Commit 63ca7ea

Browse files
committed
Switch to Gradle 9.4.0, up plugins & fix their invocation
1 parent e51c7b4 commit 63ca7ea

File tree

7 files changed

+81
-61
lines changed

7 files changed

+81
-61
lines changed

build.gradle

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
plugins {
23
id("java-library")
34
id("checkstyle")
@@ -7,8 +8,8 @@ plugins {
78
id("ru.vyarus.animalsniffer") version "2.0.1"
89
id("me.champeau.jmh") version "0.7.3"
910
id("com.github.hierynomus.license") version "0.16.1"
10-
id("biz.aQute.bnd.builder") version "6.4.0"
11-
id("com.vanniktech.maven.publish") version "0.33.0"
11+
id("biz.aQute.bnd.builder") version "7.2.1"
12+
id("com.vanniktech.maven.publish") version "0.36.0"
1213
id("org.beryx.jar") version "2.0.0"
1314
id("signing")
1415
}
@@ -50,18 +51,13 @@ dependencies {
5051
testImplementation "com.google.guava:guava:$guavaVersion"
5152
}
5253

53-
def buildWith11 = System.getenv("BUILD_WITH_11")
5454
java {
5555
toolchain {
5656
vendor = JvmVendorSpec.ADOPTIUM
57-
if ("true".equals(buildWith11)) {
58-
languageVersion = JavaLanguageVersion.of(11)
59-
} else {
60-
languageVersion = JavaLanguageVersion.of(8)
61-
}
57+
languageVersion = JavaLanguageVersion.of(25) // Temurin 26 is not out yet
6258
}
63-
sourceCompatibility = JavaVersion.VERSION_1_8
64-
targetCompatibility = JavaVersion.VERSION_1_8
59+
sourceCompatibility = JavaVersion.VERSION_25
60+
targetCompatibility = JavaVersion.VERSION_25
6561
}
6662

6763
tasks.withType(JavaCompile) {
@@ -102,27 +98,37 @@ moduleConfig {
10298
version = project.version
10399
}
104100

105-
jar {
101+
import aQute.bnd.gradle.Bundle // important import
102+
103+
tasks.register('bundle', Bundle) {
104+
archiveBaseName.set('rxjava') // or archiveFileName = "rxjava-${version}.jar"
105+
archiveVersion.set(project.version)
106+
archiveClassifier.set('') // empty → no classifier
107+
108+
from sourceSets.main.output // your classes
106109
from('.') {
107110
include 'LICENSE'
108111
include 'COPYRIGHT'
109-
into('META-INF/')
112+
into 'META-INF/'
113+
}
114+
115+
// Exclude module-info.class from root (you already had this)
116+
exclude 'module-info.class'
117+
118+
// All your Bnd instructions go here
119+
bundle {
120+
bnd('-fixupmessages': '^Classes found in the wrong directory: \\{META-INF/versions/9/module-info\\.class=module-info\\}$')
121+
122+
bnd('Bundle-Name': 'rxjava')
123+
bnd('Bundle-Vendor': 'RxJava Contributors')
124+
bnd('Bundle-Description': 'Reactive Extensions for the JVM - a library for composing asynchronous and event-based programs using observable sequences for the Java VM.')
125+
bnd('Import-Package': '!org.junit,!junit.framework,!org.mockito.*,!org.testng.*,*')
126+
bnd('Bundle-DocURL': 'https://github.com/ReactiveX/RxJava')
127+
bnd('Eclipse-ExtensibleAPI': 'true')
128+
bnd('Export-Package': '!io.reactivex.rxjava3.internal.*,io.reactivex.rxjava3.*')
129+
bnd('Bundle-SymbolicName': 'io.reactivex.rxjava3.rxjava')
130+
bnd('Multi-Release': 'true')
110131
}
111-
exclude("module-info.class")
112-
113-
// Cover for bnd still not supporting MR Jars: https://github.com/bndtools/bnd/issues/2227
114-
bnd('-fixupmessages': '^Classes found in the wrong directory: \\\\{META-INF/versions/9/module-info\\\\.class=module-info}$')
115-
bnd(
116-
"Bundle-Name": "rxjava",
117-
"Bundle-Vendor": "RxJava Contributors",
118-
"Bundle-Description": "Reactive Extensions for the JVM - a library for composing asynchronous and event-based programs using observable sequences for the Java VM.",
119-
"Import-Package": "!org.junit,!junit.framework,!org.mockito.*,!org.testng.*,*",
120-
"Bundle-DocURL": "https://github.com/ReactiveX/RxJava",
121-
"Eclipse-ExtensibleAPI": "true",
122-
"Export-Package": "!io.reactivex.rxjava3.internal.*, io.reactivex.rxjava3.*",
123-
"Bundle-SymbolicName": "io.reactivex.rxjava3.rxjava",
124-
"Multi-Release": "true"
125-
)
126132
}
127133

128134
license {

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
group=io.reactivex.rxjava3
2-
version=3.0.0-SNAPSHOT
1+
group=io.reactivex.rxjava4
2+
version=4.0.0-SNAPSHOT
33
description=RxJava: Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
44

55
POM_ARTIFACT_ID=rxjava
66
POM_NAME=RxJava
77
POM_PACKAGING=jar
88

99
POM_DESCRIPTION=Reactive Extensions for Java
10-
POM_INCEPTION_YEAR=2013
10+
POM_INCEPTION_YEAR=2026
1111

1212
POM_URL=https://github.com/ReactiveX/RxJava
1313
POM_SCM_URL=https://github.com/ReactiveX/RxJava

gradle/wrapper/gradle-wrapper.jar

-12.4 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 22 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 13 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1+
pluginManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
// mavenCentral() or others if needed
5+
}
6+
}
7+
18
rootProject.name='rxjava'
9+

0 commit comments

Comments
 (0)