Skip to content

Commit 72065c7

Browse files
committed
Remove Gradle 6 deprecation warnings
JAVA-3574
1 parent 7b4207a commit 72065c7

File tree

8 files changed

+71
-72
lines changed

8 files changed

+71
-72
lines changed

build.gradle

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ buildscript {
3131

3232
// Scala plugins
3333
classpath "com.adtran:scala-multiversion-plugin:1.0.35"
34-
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.24.2"
34+
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.27.1"
3535
}
3636
}
3737

@@ -103,11 +103,11 @@ configure(scalaProjects) {
103103
compile ('org.scala-lang:scala-library:%scala-version%')
104104
compile ('org.scala-lang:scala-reflect:%scala-version%')
105105

106-
testCompile('junit:junit:4.12')
107-
testCompile('org.scalatest:scalatest_%%:3.0.8')
108-
testCompile('org.scalamock:scalamock_%%:4.4.0')
109-
testCompile('ch.qos.logback:logback-classic:1.1.3')
110-
testCompile('org.reflections:reflections:0.9.10')
106+
testImplementation('junit:junit:4.12')
107+
testImplementation('org.scalatest:scalatest_%%:3.0.8')
108+
testImplementation('org.scalamock:scalamock_%%:4.4.0')
109+
testImplementation('ch.qos.logback:logback-classic:1.1.3')
110+
testImplementation('org.reflections:reflections:0.9.10')
111111
}
112112

113113

@@ -131,11 +131,12 @@ configure(scalaProjects) {
131131

132132
configure(javaMainProjects) {
133133
apply plugin: 'nebula.optional-base'
134-
134+
apply plugin: 'java-library'
135+
135136
dependencies {
136137
compileOnly 'com.google.code.findbugs:jsr305:1.3.9'
137-
compile 'org.slf4j:slf4j-api:1.7.6', optional
138-
testCompile 'com.google.code.findbugs:jsr305:1.3.9'
138+
api 'org.slf4j:slf4j-api:1.7.6', optional
139+
testImplementation 'com.google.code.findbugs:jsr305:1.3.9'
139140
}
140141

141142
/* Compiling */
@@ -155,13 +156,13 @@ configure(javaCodeCheckedProjects) {
155156
apply plugin: 'codenarc'
156157

157158
dependencies {
158-
testCompile 'org.codehaus.groovy:groovy-all:2.4.15'
159-
testCompile 'org.spockframework:spock-core:1.1-groovy-2.4'
160-
testCompile 'cglib:cglib-nodep:2.2.2'
161-
testCompile 'org.objenesis:objenesis:1.3'
162-
testCompile 'org.hamcrest:hamcrest-all:1.3'
163-
testCompile 'ch.qos.logback:logback-classic:1.1.1'
164-
testCompile project(':util') //Adding categories to classpath
159+
testImplementation 'org.codehaus.groovy:groovy-all:2.4.15'
160+
testImplementation 'org.spockframework:spock-core:1.1-groovy-2.4'
161+
testImplementation 'cglib:cglib-nodep:2.2.2'
162+
testImplementation 'org.objenesis:objenesis:1.3'
163+
testImplementation 'org.hamcrest:hamcrest-all:1.3'
164+
testImplementation 'ch.qos.logback:logback-classic:1.1.1'
165+
testImplementation project(':util') //Adding categories to classpath
165166
}
166167

167168
sourceSets {

driver-benchmarks/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ sourceSets {
3030
}
3131

3232
dependencies {
33-
compile project(':driver-sync')
34-
compile 'ch.qos.logback:logback-classic:1.1.1'
33+
api project(':driver-sync')
34+
implementation 'ch.qos.logback:logback-classic:1.1.1'
3535
}
3636

3737
javadoc {

driver-core/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ ext {
3131
sourceSets.main.resources.srcDirs = ['src/resources']
3232

3333
dependencies {
34-
compile project(path: ':bson', configuration: 'default')
34+
api project(path: ':bson', configuration: 'default')
3535

36-
compile "com.github.jnr:jnr-unixsocket:$jnrUnixsocketVersion", optional
37-
compile "io.netty:netty-buffer:$nettyVersion", optional
38-
compile "io.netty:netty-transport:$nettyVersion", optional
39-
compile "io.netty:netty-handler:$nettyVersion", optional
40-
compile "org.xerial.snappy:snappy-java:$snappyVersion", optional
41-
compile "com.github.luben:zstd-jni:$zstdVersion", optional
42-
compile "org.mongodb:mongodb-crypt:$mongoCryptVersion", optional
36+
implementation "com.github.jnr:jnr-unixsocket:$jnrUnixsocketVersion", optional
37+
api "io.netty:netty-buffer:$nettyVersion", optional
38+
api "io.netty:netty-transport:$nettyVersion", optional
39+
implementation "io.netty:netty-handler:$nettyVersion", optional
40+
implementation "org.xerial.snappy:snappy-java:$snappyVersion", optional
41+
implementation "com.github.luben:zstd-jni:$zstdVersion", optional
42+
implementation "org.mongodb:mongodb-crypt:$mongoCryptVersion", optional
4343

44-
testCompile project(':bson').sourceSets.test.output
44+
testImplementation project(':bson').sourceSets.test.output
4545
}
4646

4747
buildConfig {

driver-legacy/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ test {
3030
}
3131

3232
dependencies {
33-
compile project(':bson')
34-
compile project(':driver-core')
35-
compile project(':driver-sync')
33+
api project(':bson')
34+
api project(':driver-core')
35+
api project(':driver-sync')
3636

37-
testCompile project(':bson').sourceSets.test.output
38-
testCompile project(':driver-core').sourceSets.test.output
39-
testCompile project(':driver-sync').sourceSets.test.output
37+
testImplementation project(':bson').sourceSets.test.output
38+
testImplementation project(':driver-core').sourceSets.test.output
39+
testImplementation project(':driver-sync').sourceSets.test.output
4040
}

driver-reactive-streams/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ description = "A Reactive Streams implementation of the MongoDB Java driver"
1818
archivesBaseName = 'mongodb-driver-reactivestreams'
1919

2020
dependencies {
21-
compile project(path: ':bson', configuration: 'default')
22-
compile project(path: ':driver-core', configuration: 'default')
21+
api project(path: ':bson', configuration: 'default')
22+
api project(path: ':driver-core', configuration: 'default')
2323

24-
compile 'org.reactivestreams:reactive-streams:1.0.2'
24+
api 'org.reactivestreams:reactive-streams:1.0.2'
2525

26-
testCompile project(':bson').sourceSets.test.output
27-
testCompile project(':driver-sync')
28-
testCompile project(':driver-sync').sourceSets.test.output
29-
testCompile project(':driver-core').sourceSets.test.output
30-
testCompile 'org.reactivestreams:reactive-streams-tck:1.0.2'
26+
testImplementation project(':bson').sourceSets.test.output
27+
testImplementation project(':driver-sync')
28+
testImplementation project(':driver-sync').sourceSets.test.output
29+
testImplementation project(':driver-core').sourceSets.test.output
30+
testImplementation 'org.reactivestreams:reactive-streams-tck:1.0.2'
3131
}
3232

3333
sourceSets {

driver-scala/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ dependencies {
2626

2727
compile 'org.reactivestreams:reactive-streams:1.0.2'
2828

29-
testCompile project(':util')
30-
testCompile project(':driver-sync')
31-
testCompile project(':bson').sourceSets.test.output
32-
testCompile project(':driver-sync').sourceSets.test.output
33-
testCompile project(':driver-core').sourceSets.test.output
29+
testImplementation project(':util')
30+
testImplementation project(':driver-sync')
31+
testImplementation project(':bson').sourceSets.test.output
32+
testImplementation project(':driver-sync').sourceSets.test.output
33+
testImplementation project(':driver-core').sourceSets.test.output
3434
}
3535

3636

3737
configurations {
38-
integrationTestCompile.extendsFrom testCompile
38+
integrationTestCompile.extendsFrom testImplementation
3939
integrationTestRuntime.extendsFrom testRuntime
4040
}
4141

driver-sync/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ ext {
2121
}
2222

2323
dependencies {
24-
compile project(path: ':bson', configuration: 'default')
25-
compile project(path: ':driver-core', configuration: 'default')
24+
api project(path: ':bson', configuration: 'default')
25+
api project(path: ':driver-core', configuration: 'default')
2626

27-
testCompile project(':bson').sourceSets.test.output
28-
testCompile project(':driver-core').sourceSets.test.output
27+
testImplementation project(':bson').sourceSets.test.output
28+
testImplementation project(':driver-core').sourceSets.test.output
2929
}
3030

3131
sourceSets {

gradle/javadoc.gradle

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,25 @@ task docs(type: Javadoc) {
3333

3434
def utilProject = project(':util')
3535
allprojects {
36-
afterEvaluate { project ->
37-
tasks.withType(Javadoc) {
38-
dependsOn utilProject.compileJava //We need taglets to be compiled
39-
exclude "**/com/mongodb/**/benchmark/**"
40-
exclude "**/com/mongodb/**/internal/**"
41-
exclude "**/org/bson/**/internal/**"
42-
options {
43-
author = true
44-
version = true
45-
links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
46-
tagletPath single(utilProject.sourceSets.main.output.classesDirs)
47-
taglets 'ManualTaglet'
48-
taglets 'DochubTaglet'
49-
taglets 'ServerReleaseTaglet'
50-
encoding = 'UTF-8'
51-
charSet 'UTF-8'
52-
docEncoding 'UTF-8'
53-
addBooleanOption("html5", true)
54-
addBooleanOption("-allow-script-in-comments", true)
55-
header = '''
36+
tasks.withType(Javadoc) {
37+
dependsOn utilProject.compileJava //We need taglets to be compiled
38+
exclude "**/com/mongodb/**/benchmark/**"
39+
exclude "**/com/mongodb/**/internal/**"
40+
exclude "**/org/bson/**/internal/**"
41+
options {
42+
author = true
43+
version = true
44+
links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
45+
tagletPath single(utilProject.sourceSets.main.output.classesDirs)
46+
taglets 'ManualTaglet'
47+
taglets 'DochubTaglet'
48+
taglets 'ServerReleaseTaglet'
49+
encoding = 'UTF-8'
50+
charSet 'UTF-8'
51+
docEncoding 'UTF-8'
52+
addBooleanOption("html5", true)
53+
addBooleanOption("-allow-script-in-comments", true)
54+
header = '''
5655
| <script type="text/javascript">
5756
| function setLocationHash() {
5857
| try {
@@ -90,7 +89,6 @@ allprojects {
9089
| setSearchUrlPrefix();
9190
|
9291
| </script>'''.stripMargin()
93-
}
9492
}
9593
}
9694
}

0 commit comments

Comments
 (0)