@@ -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 {
@@ -54,6 +54,18 @@ java {
5454 targetCompatibility = JavaVersion . VERSION_1_8
5555}
5656
57+ def buildWith11 = System . getenv(" BUILD_WITH_11" )
58+ java {
59+ toolchain {
60+ vendor = JvmVendorSpec . ADOPTIUM
61+ if (" true" . equals(buildWith11)) {
62+ languageVersion = JavaLanguageVersion . of(11 )
63+ } else {
64+ languageVersion = JavaLanguageVersion . of(8 )
65+ }
66+ }
67+ }
68+
5769tasks. withType(JavaCompile ) {
5870 options. compilerArgs << " -parameters"
5971}
@@ -86,12 +98,18 @@ animalsniffer {
8698 annotation = " io.reactivex.rxjava3.internal.util.SuppressAnimalSniffer"
8799}
88100
101+ moduleConfig {
102+ moduleInfoPath = ' src/main/module/module-info.java'
103+ multiReleaseVersion = 9
104+ }
105+
89106jar {
90107 from(' .' ) {
91108 include ' LICENSE'
92109 include ' COPYRIGHT'
93110 into(' META-INF/' )
94111 }
112+ exclude(" module-info.class" )
95113
96114 // Cover for bnd still not supporting MR Jars: https://github.com/bndtools/bnd/issues/2227
97115 bnd(' -fixupmessages' : ' ^Classes found in the wrong directory: \\\\ {META-INF/versions/9/module-info\\\\ .class=module-info}$' )
@@ -106,8 +124,6 @@ jar {
106124 " Bundle-SymbolicName" : " io.reactivex.rxjava3.rxjava" ,
107125 " Multi-Release" : " true"
108126 )
109-
110- moduleInfoPath = ' src/main/module/module-info.java'
111127}
112128
113129license {
@@ -166,8 +182,9 @@ jacocoTestReport {
166182 dependsOn testNG
167183
168184 reports {
169- xml. enabled = true
170- html. enabled = true
185+ xml. required. set(true )
186+ csv. required. set(false )
187+ html. required. set(true )
171188 }
172189}
173190
@@ -184,39 +201,12 @@ checkstyle {
184201if (project. hasProperty(" releaseMode" )) {
185202 logger. lifecycle(" ReleaseMode: {}" , project. releaseMode)
186203
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- */
207204
208205 if (" full" == project. releaseMode) {
209206 signing {
210207 if (project. hasProperty(" SIGNING_PRIVATE_KEY" ) && project. hasProperty(" SIGNING_PASSWORD" )) {
211208 useInMemoryPgpKeys(project. getProperty(" SIGNING_PRIVATE_KEY" ), project. getProperty(" SIGNING_PASSWORD" ))
212209 }
213210 }
214- /*
215- mavenPublish {
216- nexus {
217- stagingProfile = "io.reactivex"
218- }
219- }
220- */
221211 }
222212}
0 commit comments