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.
This commit is contained in:
Ben Gruver 2021-03-01 14:10:15 -08:00
parent ecd68918ac
commit 53b52f023d
5 changed files with 31 additions and 29 deletions

View File

@ -39,13 +39,14 @@ buildscript {
}
dependencies {
compile project(':util')
compile project(':dexlib2')
compile depends.guava
compile depends.jcommander
implementation project(':util')
implementation project(':dexlib2')
implementation depends.guava
implementation depends.jcommander
testCompile depends.junit
testCompile project(':smali')
testImplementation depends.junit
testImplementation project(':smali')
testImplementation depends.antlr_runtime
}
processResources.inputs.property('version', version)
@ -54,7 +55,7 @@ processResources.expand('version': version)
// Build a separate jar that contains all dependencies
task fatJar(type: Jar) {
from sourceSets.main.output
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
classifier = 'fat'

View File

@ -30,10 +30,10 @@
*/
dependencies {
compile project(':util')
compile 'com.google.code.findbugs:jsr305:1.3.9'
compile 'com.google.guava:guava:13.0.1'
compile 'org.antlr:ST4:4.0.7'
implementation project(':util')
implementation 'com.google.code.findbugs:jsr305:1.3.9'
implementation 'com.google.guava:guava:13.0.1'
implementation 'org.antlr:ST4:4.0.7'
testCompile 'junit:junit:4.6'
testImplementation 'junit:junit:4.6'
}

View File

@ -46,11 +46,11 @@ configurations {
}
dependencies {
compile depends.findbugs
compile depends.guava
implementation depends.findbugs
implementation depends.guava
testCompile depends.junit
testCompile depends.mockito
testImplementation depends.junit
testImplementation depends.mockito
accessorTestGenerator project('accessorTestGenerator')

View File

@ -45,7 +45,7 @@ buildscript {
configurations {
// Remove the full antlr library that's added by the antlr plugin. We manually
// add the smaller antlr_runtime library instead
compile.exclude group: 'org.antlr', module: 'antlr'
implementation.exclude group: 'org.antlr', module: 'antlr'
}
sourceSets {
@ -73,13 +73,14 @@ idea {
}
dependencies {
compile project(':util')
compile project(':dexlib2')
compile depends.antlr_runtime
compile depends.jcommander
compile depends.stringtemplate
implementation project(':util')
implementation project(':dexlib2')
implementation depends.antlr_runtime
implementation depends.jcommander
implementation depends.stringtemplate
implementation depends.guava
testCompile depends.junit
testImplementation depends.junit
antlr depends.antlr
}
@ -90,7 +91,7 @@ processResources.expand('version': version)
// Build a separate jar that contains all dependencies
task fatJar(type: Jar, dependsOn: jar) {
from sourceSets.main.output
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
classifier = 'fat'

View File

@ -30,11 +30,11 @@
*/
dependencies {
compile project(':dexlib2')
compile depends.findbugs
compile depends.guava
compile depends.jcommander
testCompile depends.junit
implementation project(':dexlib2')
implementation depends.findbugs
implementation depends.guava
implementation depends.jcommander
testImplementation depends.junit
}
uploadArchives {