build: resolve gradle deprecation warnings
This commit is contained in:
+21
-18
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'org.sonarqube' version '3.0'
|
||||
id 'com.github.ben-manes.versions' version '0.28.0'
|
||||
id "com.diffplug.gradle.spotless" version "4.5.0"
|
||||
id "com.diffplug.gradle.spotless" version "4.5.1"
|
||||
}
|
||||
|
||||
ext.jadxVersion = System.getenv('JADX_VERSION') ?: "dev"
|
||||
@@ -29,25 +29,24 @@ allprojects {
|
||||
}
|
||||
|
||||
jar {
|
||||
version = jadxVersion
|
||||
manifest {
|
||||
mainAttributes('jadx-version': jadxVersion)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'org.slf4j:slf4j-api:1.7.30'
|
||||
implementation 'org.slf4j:slf4j-api:1.7.30'
|
||||
compileOnly 'org.jetbrains:annotations:19.0.0'
|
||||
|
||||
testCompile 'ch.qos.logback:logback-classic:1.2.3'
|
||||
testCompile 'org.hamcrest:hamcrest-library:2.2'
|
||||
testCompile 'org.mockito:mockito-core:3.3.3'
|
||||
testCompile 'org.assertj:assertj-core:3.16.1'
|
||||
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
|
||||
testImplementation 'org.hamcrest:hamcrest-library:2.2'
|
||||
testImplementation 'org.mockito:mockito-core:3.4.0'
|
||||
testImplementation 'org.assertj:assertj-core:3.16.1'
|
||||
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
|
||||
|
||||
testCompile 'org.eclipse.jdt.core.compiler:ecj:4.6.1'
|
||||
testImplementation 'org.eclipse.jdt.core.compiler:ecj:4.6.1'
|
||||
testCompileOnly 'org.jetbrains:annotations:19.0.0'
|
||||
}
|
||||
|
||||
@@ -114,14 +113,16 @@ spotless {
|
||||
}
|
||||
}
|
||||
|
||||
dependencyUpdates.resolutionStrategy = {
|
||||
componentSelection { rules ->
|
||||
rules.all { ComponentSelection selection ->
|
||||
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'atlassian'].any { qualifier ->
|
||||
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
|
||||
}
|
||||
if (rejected) {
|
||||
selection.reject('Release candidate')
|
||||
dependencyUpdates {
|
||||
resolutionStrategy {
|
||||
componentSelection { rules ->
|
||||
rules.all { ComponentSelection selection ->
|
||||
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'atlassian'].any { qualifier ->
|
||||
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
|
||||
}
|
||||
if (rejected) {
|
||||
selection.reject('Release candidate')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,11 +133,12 @@ task copyArtifacts(type: Sync, dependsOn: ['jadx-cli:installDist', 'jadx-gui:ins
|
||||
['jadx-cli', 'jadx-gui'].each {
|
||||
from tasks.getByPath(":${it}:installDist").destinationDir
|
||||
}
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
|
||||
task pack(type: Zip, dependsOn: copyArtifacts) {
|
||||
destinationDir buildDir
|
||||
archiveName "jadx-${jadxVersion}.zip"
|
||||
destinationDirectory = buildDir
|
||||
archiveFileName = "jadx-${jadxVersion}.zip"
|
||||
from copyArtifacts.destinationDir
|
||||
}
|
||||
|
||||
@@ -146,6 +148,7 @@ task copyExe(type: Copy, dependsOn: 'jadx-gui:createExe') {
|
||||
destinationDir buildDir
|
||||
from tasks.getByPath('jadx-gui:createExe').outputs
|
||||
include '*.exe'
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
|
||||
task dist(dependsOn: [pack, copyExe]) {
|
||||
|
||||
@@ -3,13 +3,13 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(':jadx-core'))
|
||||
implementation(project(':jadx-core'))
|
||||
|
||||
runtime(project(':jadx-plugins:jadx-dex-input'))
|
||||
runtime(project(':jadx-plugins:jadx-java-convert'))
|
||||
runtimeOnly(project(':jadx-plugins:jadx-dex-input'))
|
||||
runtimeOnly(project(':jadx-plugins:jadx-java-convert'))
|
||||
|
||||
compile 'com.beust:jcommander:1.78'
|
||||
compile 'ch.qos.logback:logback-classic:1.2.3'
|
||||
implementation 'com.beust:jcommander:1.78'
|
||||
implementation 'ch.qos.logback:logback-classic:1.2.3'
|
||||
}
|
||||
|
||||
application {
|
||||
|
||||
@@ -3,23 +3,23 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
runtime files('clsp-data/android-29-clst.jar')
|
||||
runtime files('clsp-data/android-29-res.jar')
|
||||
runtimeOnly files('clsp-data/android-29-clst.jar')
|
||||
runtimeOnly files('clsp-data/android-29-res.jar')
|
||||
|
||||
api(project(':jadx-plugins:jadx-plugins-api'))
|
||||
|
||||
compile 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
|
||||
compile 'org.smali:baksmali:2.4.0'
|
||||
compile('org.smali:smali:2.4.0') {
|
||||
implementation 'org.smali:baksmali:2.4.0'
|
||||
implementation('org.smali:smali:2.4.0') {
|
||||
exclude group: 'com.google.guava'
|
||||
}
|
||||
compile 'com.google.guava:guava:29.0-jre'
|
||||
implementation 'com.google.guava:guava:29.0-jre'
|
||||
|
||||
testCompile 'org.apache.commons:commons-lang3:3.10'
|
||||
testImplementation 'org.apache.commons:commons-lang3:3.10'
|
||||
|
||||
testRuntime(project(':jadx-plugins:jadx-dex-input'))
|
||||
testRuntime(project(':jadx-plugins:jadx-java-convert'))
|
||||
testRuntimeOnly(project(':jadx-plugins:jadx-dex-input'))
|
||||
testRuntimeOnly(project(':jadx-plugins:jadx-java-convert'))
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+16
-12
@@ -5,19 +5,23 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":jadx-core"))
|
||||
compile(project(":jadx-cli"))
|
||||
implementation(project(':jadx-core'))
|
||||
|
||||
compile 'com.fifesoft:rsyntaxtextarea:3.1.1'
|
||||
compile files('libs/jfontchooser-1.0.5.jar')
|
||||
compile 'hu.kazocsaba:image-viewer:1.2.3'
|
||||
implementation(project(":jadx-cli"))
|
||||
implementation 'com.beust:jcommander:1.78'
|
||||
implementation 'ch.qos.logback:logback-classic:1.2.3'
|
||||
|
||||
compile 'org.apache.commons:commons-lang3:3.10'
|
||||
compile 'org.apache.commons:commons-text:1.8'
|
||||
implementation 'com.fifesoft:rsyntaxtextarea:3.1.1'
|
||||
implementation files('libs/jfontchooser-1.0.5.jar')
|
||||
implementation 'hu.kazocsaba:image-viewer:1.2.3'
|
||||
|
||||
compile 'io.reactivex.rxjava2:rxjava:2.2.19'
|
||||
compile "com.github.akarnokd:rxjava2-swing:0.3.7"
|
||||
compile 'com.android.tools.build:apksig:4.0.0'
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'org.apache.commons:commons-lang3:3.10'
|
||||
implementation 'org.apache.commons:commons-text:1.8'
|
||||
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
|
||||
implementation "com.github.akarnokd:rxjava2-swing:0.3.7"
|
||||
implementation 'com.android.tools.build:apksig:4.0.0'
|
||||
}
|
||||
|
||||
application {
|
||||
@@ -38,7 +42,7 @@ jar {
|
||||
manifest {
|
||||
attributes(
|
||||
"Main-Class": mainClassName,
|
||||
"Class-Path": configurations.compile.collect { it.getName() }.join(' ')
|
||||
"Class-Path": configurations.runtimeClasspath.collect { it.getName() }.join(' ')
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -61,7 +65,7 @@ startScripts {
|
||||
launch4j {
|
||||
mainClassName = 'jadx.gui.JadxGUI'
|
||||
copyConfigurable = project.tasks.shadowJar.outputs.files
|
||||
jar = "lib/${project.tasks.shadowJar.archiveName}"
|
||||
jar = "lib/${project.tasks.shadowJar.archiveFileName.get()}"
|
||||
icon = "${projectDir}/src/main/resources/logos/jadx-logo.ico"
|
||||
outfile = "jadx-gui-${version}.exe"
|
||||
copyright = 'Skylot'
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
project.ext {
|
||||
mainSamplesClass = "jadx.samples.RunTests"
|
||||
mainSamplesClass = 'jadx.samples.RunTests'
|
||||
samplesJadxSrcDir = "${buildDir}/samples-jadx/src"
|
||||
samplesJadxOutDir = "${buildDir}/samples-jadx/output"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":jadx-cli"))
|
||||
implementation(project(":jadx-cli"))
|
||||
}
|
||||
|
||||
compileJava {
|
||||
@@ -21,25 +21,25 @@ task samplesRun(type: JavaExec, dependsOn: compileJava) {
|
||||
}
|
||||
|
||||
task samplesJar(type: Jar, dependsOn: samplesRun) {
|
||||
baseName = 'samples'
|
||||
archivesBaseName = 'samples'
|
||||
from sourceSets.main.output
|
||||
}
|
||||
|
||||
task samplesJadxCreate(type: JavaExec, dependsOn: samplesJar) {
|
||||
classpath = sourceSets.main.output + configurations.compile
|
||||
classpath = sourceSets.main.output + configurations.runtimeClasspath
|
||||
main = project(":jadx-cli").mainClassName
|
||||
args = ['-v', '-d', samplesJadxSrcDir, samplesJar.archivePath]
|
||||
args = ['-v', '-d', samplesJadxSrcDir, samplesJar.archiveFile.get()]
|
||||
}
|
||||
|
||||
task samplesJadxCompile(type: JavaCompile, dependsOn: samplesJadxCreate) {
|
||||
classpath = configurations.compile
|
||||
destinationDir = file samplesJadxOutDir
|
||||
classpath = configurations.runtimeClasspath
|
||||
destinationDir = file(samplesJadxOutDir)
|
||||
source = samplesJadxSrcDir
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
task samplesJadxRun(type: JavaExec, dependsOn: samplesJadxCompile) {
|
||||
classpath = files samplesJadxOutDir
|
||||
classpath = files(samplesJadxOutDir)
|
||||
main = mainSamplesClass
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user