refactor: 'compile' it's deprecated

`compile` it's deprecated since Gradle 6.0 and been discouraged since Gradle 3.4.

We should use `implementation` and `api` instead because `compile` will be removed in Gradle 7.0.

https://docs.gradle.org/6.5.1/userguide/upgrading_version_5.html#deprecations
This commit is contained in:
Giacomo Ferretti 2020-08-10 14:45:00 +02:00 committed by Connor Tumbleson
parent 5a5566bf27
commit 4c3f1f335a
6 changed files with 28 additions and 23 deletions

View File

@ -16,8 +16,8 @@
apply plugin: 'com.github.johnrengelman.shadow'
dependencies {
compile depends.commons_cli
compile project(':brut.apktool:apktool-lib')
implementation depends.commons_cli
implementation project(':brut.apktool:apktool-lib')
}
buildscript {

View File

@ -15,6 +15,8 @@
*/
import org.apache.tools.ant.filters.*
apply plugin: 'java-library'
processResources {
from('src/main/resources/properties') {
include '**/*.properties'
@ -29,19 +31,21 @@ processResources {
}
dependencies {
compile("junit:junit:4.10") {
testImplementation("junit:junit:4.10") {
exclude(module: 'hamcrest-core')
}
compile project(':brut.j.dir'),
project(':brut.j.util'),
project(':brut.j.common'),
depends.baksmali,
depends.smali,
depends.snakeyaml,
depends.xmlpull,
depends.guava,
depends.commons_lang
api project(':brut.j.dir'),
project(':brut.j.util'),
project(':brut.j.common')
testCompile depends.xmlunit
implementation depends.baksmali,
depends.smali,
depends.snakeyaml,
depends.xmlpull,
depends.guava,
depends.commons_lang,
depends.commons_io
testImplementation depends.xmlunit
}

View File

@ -15,6 +15,6 @@
*/
dependencies {
testCompile depends.junit
testImplementation depends.junit
}

View File

@ -15,7 +15,8 @@
*/
dependencies {
compile project(':brut.j.common'),
project(':brut.j.util')
testCompile depends.junit
implementation project(':brut.j.common'),
project(':brut.j.util'),
depends.commons_io
testImplementation depends.junit
}

View File

@ -15,7 +15,7 @@
*/
dependencies {
compile project(':brut.j.common'),
depends.commons_io
testCompile depends.junit
implementation project(':brut.j.common'),
depends.commons_io
testImplementation depends.junit
}

View File

@ -26,13 +26,13 @@ buildscript {
}
plugins {
id "com.github.hierynomus.license" version "0.15.0"
id 'com.github.hierynomus.license' version '0.15.0'
}
apply from: 'gradle/functions.gradle'
def apktoolversion_major = '2.4.2'
def apktoolversion_minor = 'SNAPSHOT';
def apktoolversion_minor = 'SNAPSHOT'
defaultTasks 'build', 'shadowJar', 'proguard'
@ -48,7 +48,7 @@ allprojects {
exclude "**/android/util/*.java"
include "**/*.java"
mapping {
java='SLASHSTAR_STYLE'
java = 'SLASHSTAR_STYLE'
}
strictCheck true