@@ -8,8 +8,8 @@ plugins {
88 id(" me.champeau.gradle.jmh" ) version " 0.5.3"
99 id(" com.github.hierynomus.license" ) version " 0.16.1"
1010 id(" biz.aQute.bnd.builder" ) version " 6.4.0"
11- id(" com.vanniktech.maven.publish" ) version " 0.19 .0"
12- id(" org.beryx.jar" ) version " 1.2 .0"
11+ id(" com.vanniktech.maven.publish" ) version " 0.32 .0"
12+ id(" org.beryx.jar" ) version " 2.0 .0"
1313}
1414
1515ext {
@@ -49,7 +49,16 @@ dependencies {
4949 testImplementation " com.google.guava:guava:$guavaVersion "
5050}
5151
52+ def buildWith11 = System . getenv(" BUILD_WITH_11" )
5253java {
54+ toolchain {
55+ vendor = JvmVendorSpec . ADOPTIUM
56+ if (" true" . equals(buildWith11)) {
57+ languageVersion = JavaLanguageVersion . of(11 )
58+ } else {
59+ languageVersion = JavaLanguageVersion . of(8 )
60+ }
61+ }
5362 sourceCompatibility = JavaVersion . VERSION_1_8
5463 targetCompatibility = JavaVersion . VERSION_1_8
5564}
@@ -86,12 +95,18 @@ animalsniffer {
8695 annotation = " io.reactivex.rxjava3.internal.util.SuppressAnimalSniffer"
8796}
8897
98+ moduleConfig {
99+ moduleInfoPath = ' src/main/module/module-info.java'
100+ multiReleaseVersion = 9
101+ }
102+
89103jar {
90104 from(' .' ) {
91105 include ' LICENSE'
92106 include ' COPYRIGHT'
93107 into(' META-INF/' )
94108 }
109+ exclude(" module-info.class" )
95110
96111 // Cover for bnd still not supporting MR Jars: https://github.com/bndtools/bnd/issues/2227
97112 bnd(' -fixupmessages' : ' ^Classes found in the wrong directory: \\\\ {META-INF/versions/9/module-info\\\\ .class=module-info}$' )
@@ -106,8 +121,6 @@ jar {
106121 " Bundle-SymbolicName" : " io.reactivex.rxjava3.rxjava" ,
107122 " Multi-Release" : " true"
108123 )
109-
110- moduleInfoPath = ' src/main/module/module-info.java'
111124}
112125
113126license {
@@ -166,8 +179,9 @@ jacocoTestReport {
166179 dependsOn testNG
167180
168181 reports {
169- xml. enabled = true
170- html. enabled = true
182+ xml. required. set(true )
183+ csv. required. set(false )
184+ html. required. set(true )
171185 }
172186}
173187
@@ -179,44 +193,18 @@ checkstyle {
179193 " checkstyle.suppressions.file" : project. file(" config/checkstyle/suppressions.xml" ),
180194 " checkstyle.header.file" : project. file(" config/license/HEADER_JAVA" )
181195 ]
196+ checkstyleMain. exclude ' **/module-info.java'
182197}
183198
184199if (project. hasProperty(" releaseMode" )) {
185200 logger. lifecycle(" ReleaseMode: {}" , project. releaseMode)
186201
187- /*
188- if ("branch" == project.releaseMode) {
189-
190- if (version.endsWith("-SNAPSHOT")) {
191- publishing {
192- repositories {
193- maven {
194- url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
195- }
196- }
197- }
198-
199- mavenPublish {
200- nexus {
201- stagingProfile = "io.reactivex"
202- }
203- }
204- }
205- }
206- */
207202
208203 if (" full" == project. releaseMode) {
209204 signing {
210205 if (project. hasProperty(" SIGNING_PRIVATE_KEY" ) && project. hasProperty(" SIGNING_PASSWORD" )) {
211206 useInMemoryPgpKeys(project. getProperty(" SIGNING_PRIVATE_KEY" ), project. getProperty(" SIGNING_PASSWORD" ))
212207 }
213208 }
214- /*
215- mavenPublish {
216- nexus {
217- stagingProfile = "io.reactivex"
218- }
219- }
220- */
221209 }
222210}
0 commit comments