Skip to content

Commit 53b52f0

Browse files
committed
Switch from "compile" to "implementation" in gradle dependencies
compile/testCompile has been deprecated for a long time, and will be removed in the next major version of gradle.
1 parent ecd6891 commit 53b52f0

File tree

5 files changed

+32
-30
lines changed

5 files changed

+32
-30
lines changed

baksmali/build.gradle

+9-8
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@ buildscript {
3939
}
4040

4141
dependencies {
42-
compile project(':util')
43-
compile project(':dexlib2')
44-
compile depends.guava
45-
compile depends.jcommander
46-
47-
testCompile depends.junit
48-
testCompile project(':smali')
42+
implementation project(':util')
43+
implementation project(':dexlib2')
44+
implementation depends.guava
45+
implementation depends.jcommander
46+
47+
testImplementation depends.junit
48+
testImplementation project(':smali')
49+
testImplementation depends.antlr_runtime
4950
}
5051

5152
processResources.inputs.property('version', version)
@@ -54,7 +55,7 @@ processResources.expand('version': version)
5455
// Build a separate jar that contains all dependencies
5556
task fatJar(type: Jar) {
5657
from sourceSets.main.output
57-
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
58+
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
5859

5960
classifier = 'fat'
6061

dexlib2/accessorTestGenerator/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
*/
3131

3232
dependencies {
33-
compile project(':util')
34-
compile 'com.google.code.findbugs:jsr305:1.3.9'
35-
compile 'com.google.guava:guava:13.0.1'
36-
compile 'org.antlr:ST4:4.0.7'
33+
implementation project(':util')
34+
implementation 'com.google.code.findbugs:jsr305:1.3.9'
35+
implementation 'com.google.guava:guava:13.0.1'
36+
implementation 'org.antlr:ST4:4.0.7'
3737

38-
testCompile 'junit:junit:4.6'
38+
testImplementation 'junit:junit:4.6'
3939
}

dexlib2/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ configurations {
4646
}
4747

4848
dependencies {
49-
compile depends.findbugs
50-
compile depends.guava
49+
implementation depends.findbugs
50+
implementation depends.guava
5151

52-
testCompile depends.junit
53-
testCompile depends.mockito
52+
testImplementation depends.junit
53+
testImplementation depends.mockito
5454

5555
accessorTestGenerator project('accessorTestGenerator')
5656

smali/build.gradle

+9-8
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ buildscript {
4545
configurations {
4646
// Remove the full antlr library that's added by the antlr plugin. We manually
4747
// add the smaller antlr_runtime library instead
48-
compile.exclude group: 'org.antlr', module: 'antlr'
48+
implementation.exclude group: 'org.antlr', module: 'antlr'
4949
}
5050

5151
sourceSets {
@@ -73,13 +73,14 @@ idea {
7373
}
7474

7575
dependencies {
76-
compile project(':util')
77-
compile project(':dexlib2')
78-
compile depends.antlr_runtime
79-
compile depends.jcommander
80-
compile depends.stringtemplate
76+
implementation project(':util')
77+
implementation project(':dexlib2')
78+
implementation depends.antlr_runtime
79+
implementation depends.jcommander
80+
implementation depends.stringtemplate
81+
implementation depends.guava
8182

82-
testCompile depends.junit
83+
testImplementation depends.junit
8384

8485
antlr depends.antlr
8586
}
@@ -90,7 +91,7 @@ processResources.expand('version': version)
9091
// Build a separate jar that contains all dependencies
9192
task fatJar(type: Jar, dependsOn: jar) {
9293
from sourceSets.main.output
93-
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
94+
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
9495

9596
classifier = 'fat'
9697

util/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
*/
3131

3232
dependencies {
33-
compile project(':dexlib2')
34-
compile depends.findbugs
35-
compile depends.guava
36-
compile depends.jcommander
37-
testCompile depends.junit
33+
implementation project(':dexlib2')
34+
implementation depends.findbugs
35+
implementation depends.guava
36+
implementation depends.jcommander
37+
testImplementation depends.junit
3838
}
3939

4040
uploadArchives {

0 commit comments

Comments
 (0)