Skip to content

Commit 7358dc1

Browse files
authored
3.x: Upgrade Gradle & dependency versions (#6632)
* 3.x: Upgrade Gradle & dependency versions * Add checkstyle version string to the top, fix JMH class
1 parent 85e1c4c commit 7358dc1

File tree

6 files changed

+47
-41
lines changed

6 files changed

+47
-41
lines changed

build.gradle

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
buildscript {
2+
3+
// Dependency versions
4+
// ---------------------------------------
5+
6+
ext.reactiveStreamsVersion = "1.0.3-RC1"
7+
ext.junitVersion = "4.12"
8+
ext.testNgVersion = "7.0.0"
9+
ext.mockitoVersion = "3.0.0"
10+
ext.jmhLibVersion = "1.21"
11+
ext.jmhGradleVersion = "0.5.0-rc-2"
12+
ext.guavaVersion = "28.0-jre"
13+
ext.jacocoVersion = "0.8.4"
14+
ext.animalSnifferVersion = "1.5.0"
15+
ext.licenseVersion = "0.15.0"
16+
ext.bintrayVersion = "1.7.3"
17+
ext.jfrogExtractorVersion = "4.5.2"
18+
ext.bndVersion = "4.2.0"
19+
ext.checkstyleVersion = "6.19"
20+
21+
// --------------------------------------
22+
223
repositories {
324
jcenter()
425
mavenCentral()
@@ -7,11 +28,12 @@ buildscript {
728
}
829
}
930
dependencies {
10-
classpath "ru.vyarus:gradle-animalsniffer-plugin:1.2.0"
11-
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.13.1"
12-
classpath "me.champeau.gradle:jmh-gradle-plugin:0.4.5"
13-
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3"
14-
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.5.2"
31+
classpath "ru.vyarus:gradle-animalsniffer-plugin:$animalSnifferVersion"
32+
classpath "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:$licenseVersion"
33+
classpath "me.champeau.gradle:jmh-gradle-plugin:$jmhGradleVersion"
34+
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$bintrayVersion"
35+
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:$jfrogExtractorVersion"
36+
classpath "biz.aQute.bnd:biz.aQute.bnd.gradle:$bndVersion"
1537
}
1638
}
1739

@@ -38,7 +60,6 @@ apply plugin: "checkstyle"
3860
apply plugin: "jacoco"
3961
apply plugin: "ru.vyarus.animalsniffer"
4062
apply plugin: "maven"
41-
apply plugin: "osgi"
4263
apply plugin: "me.champeau.gradle.jmh"
4364
apply plugin: "com.github.hierynomus.license"
4465
apply plugin: "com.jfrog.bintray"
@@ -48,18 +69,6 @@ apply plugin: "eclipse"
4869
sourceCompatibility = JavaVersion.VERSION_1_6
4970
targetCompatibility = JavaVersion.VERSION_1_6
5071

51-
// Dependency versions
52-
// ---------------------------------------
53-
54-
def junitVersion = "4.12"
55-
def reactiveStreamsVersion = "1.0.3-RC1"
56-
def mockitoVersion = "2.1.0"
57-
def jmhLibVersion = "1.20"
58-
def testNgVersion = "6.11"
59-
def guavaVersion = "24.0-jre"
60-
def jacocoVersion = "0.8.0"
61-
// --------------------------------------
62-
6372
repositories {
6473
mavenCentral()
6574
}
@@ -124,15 +133,17 @@ artifacts {
124133
archives javadocJar
125134
}
126135

136+
apply plugin: 'biz.aQute.bnd.builder'
137+
127138
jar {
128-
manifest {
129-
name = "rxjava"
130-
instruction "Bundle-Vendor", "RxJava Contributors"
131-
instruction "Bundle-DocURL", "https://github.com/ReactiveX/RxJava"
132-
instruction "Import-Package", "!org.junit,!junit.framework,!org.mockito.*,!org.testng.*,*"
133-
instruction "Eclipse-ExtensibleAPI", "true"
134-
instruction "Automatic-Module-Name", "io.reactivex.rxjava3"
135-
}
139+
bnd ('Bundle-Name': 'rxjava',
140+
'Bundle-Vendor': 'RxJava Contributors',
141+
'Bundle-Description': 'Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.',
142+
'Import-Package': '!org.junit,!junit.framework,!org.mockito.*,!org.testng.*,*',
143+
'Bundle-DocURL': 'https://github.com/ReactiveX/RxJava',
144+
'Eclipse-ExtensibleAPI': 'true',
145+
'Automatic-Module-Name': 'io.reactivex.rxjava3'
146+
)
136147
}
137148

138149
license {
@@ -289,13 +300,6 @@ jacocoTestReport {
289300
xml.enabled = true
290301
html.enabled = true
291302
}
292-
293-
afterEvaluate {
294-
classDirectories = files(classDirectories.files.collect {
295-
fileTree(dir: it,
296-
exclude: ["io/reactivex/tck/**"])
297-
})
298-
}
299303
}
300304

301305
jacocoTestReport.dependsOn GCandMem
@@ -305,7 +309,7 @@ build.dependsOn jacocoTestReport
305309
checkstyle {
306310
configFile file("checkstyle.xml")
307311
ignoreFailures = true
308-
toolVersion ="6.19"
312+
toolVersion = checkstyleVersion
309313
}
310314

311315
if (rootProject.hasProperty("releaseMode")) {

gradle/wrapper/gradle-wrapper.jar

19 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-bin.zip

src/jmh/java/io/reactivex/rxjava3/core/InputWithIncrementingInteger.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public void onNext(Integer t) {
4444
}
4545

4646
final class IncrementingIterable implements Iterable<Integer> {
47-
private final class IncrementingIterator implements Iterator<Integer> {
47+
48+
final class IncrementingIterator implements Iterator<Integer> {
4849
int i;
4950

5051
@Override
@@ -64,9 +65,9 @@ public void remove() {
6465
}
6566
}
6667

67-
private final int size;
68+
final int size;
6869

69-
private IncrementingIterable(int size) {
70+
IncrementingIterable(int size) {
7071
this.size = size;
7172
}
7273

@@ -77,7 +78,8 @@ public Iterator<Integer> iterator() {
7778
}
7879

7980
final class IncrementingPublisher implements Publisher<Integer> {
80-
private final int size;
81+
82+
final int size;
8183

8284
IncrementingPublisher(int size) {
8385
this.size = size;

src/test/java/io/reactivex/rxjava3/disposables/SequentialDisposableTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import org.junit.*;
2323
import org.junit.runner.RunWith;
24-
import org.mockito.runners.MockitoJUnitRunner;
24+
import org.mockito.junit.MockitoJUnitRunner;
2525

2626
import io.reactivex.rxjava3.core.RxJavaTest;
2727
import io.reactivex.rxjava3.internal.disposables.SequentialDisposable;

src/test/java/io/reactivex/rxjava3/disposables/SerialDisposableTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import org.junit.*;
2323
import org.junit.runner.RunWith;
24-
import org.mockito.runners.MockitoJUnitRunner;
24+
import org.mockito.junit.MockitoJUnitRunner;
2525

2626
import io.reactivex.rxjava3.core.RxJavaTest;
2727
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;

0 commit comments

Comments
 (0)