Commit 7096c382 authored by Skylot's avatar Skylot

fix gradle scripts, update readme

parent c4cdd851
## JADX [![Build Status](https://buildhive.cloudbees.com/job/skylot/job/jadx/badge/icon)](https://buildhive.cloudbees.com/job/skylot/job/jadx/) ## JADX
**jadx** - Dex to Java decompiler **jadx** - Dex to Java decompiler
Command line tool for produce Java sources from Android Dex and Jar files Command line and GUI tools for produce Java source code from Android Dex files
Note: jadx-gui now in experimental stage
### Downloads ### Downloads
Latest version available at Latest version available at
[github](https://github.com/skylot/jadx/releases), [github](https://github.com/skylot/jadx/releases) or
[sourceforge](http://sourceforge.net/projects/jadx/files/) [sourceforge](http://sourceforge.net/projects/jadx/files/)
or
[bintray](http://bintray.com/pkg/show/general/skylot/jadx/jadx-cli)
### Build
### Build [![Build Status](https://buildhive.cloudbees.com/job/skylot/job/jadx/badge/icon)](https://buildhive.cloudbees.com/job/skylot/job/jadx/)
git clone https://github.com/skylot/jadx.git git clone https://github.com/skylot/jadx.git
cd jadx cd jadx
./gradlew build ./gradlew clean build pack
(on Windows, use `gradlew.bat` instead of `./gradlew`) (on Windows, use `gradlew.bat` instead of `./gradlew`)
Scripts for run jadx will be placed in `build/install/jadx/bin` Scripts for run jadx will be placed in `build/jadx/bin`
and also packed to `build/distributions/jadx-<version>.zip` and also packed to `build/jadx-<version>.zip`
### Run ### Run
Run **jadx** on itself: Run **jadx** on itself:
cd build/install/jadx/ cd build/jadx/
bin/jadx -d out lib/jadx-*.jar bin/jadx-cli -d out lib/jadx-core-*.jar
or
bin/jadx-gui lib/jadx-core-*.jar
### Usage ### Usage
``` ```
......
...@@ -10,6 +10,8 @@ subprojects { ...@@ -10,6 +10,8 @@ subprojects {
sourceCompatibility = 1.6 sourceCompatibility = 1.6
targetCompatibility = 1.6 targetCompatibility = 1.6
version = jadxVersion
jar { jar {
version = jadxVersion version = jadxVersion
} }
...@@ -19,7 +21,6 @@ subprojects { ...@@ -19,7 +21,6 @@ subprojects {
} }
dependencies { dependencies {
compile 'com.google.android.tools:dx:1.7'
compile 'org.slf4j:slf4j-api:1.7.5' compile 'org.slf4j:slf4j-api:1.7.5'
compile 'ch.qos.logback:logback-classic:1.0.13' compile 'ch.qos.logback:logback-classic:1.0.13'
testCompile 'junit:junit:4.11' testCompile 'junit:junit:4.11'
...@@ -30,6 +31,23 @@ subprojects { ...@@ -30,6 +31,23 @@ subprojects {
} }
} }
task copyArtifacts (type: Sync, dependsOn: ["jadx-cli:installApp", "jadx-gui:installApp"]) {
destinationDir file("$buildDir/jadx")
['jadx-cli', 'jadx-gui'].each {
from tasks.getByPath(":${it}:installApp").destinationDir
}
}
task pack (type: Zip, dependsOn: copyArtifacts) {
destinationDir buildDir
archiveName "jadx-${jadxVersion}.zip"
from copyArtifacts.destinationDir
}
task clean(type: Delete) {
delete buildDir
}
task wrapper(type: Wrapper) { task wrapper(type: Wrapper) {
gradleVersion = '1.6' gradleVersion = '1.6'
} }
......
...@@ -22,7 +22,7 @@ startScripts { ...@@ -22,7 +22,7 @@ startScripts {
applicationDistribution.with { applicationDistribution.with {
into('') { into('') {
from '.' from '../.'
include 'README.md' include 'README.md'
include 'NOTICE' include 'NOTICE'
} }
......
...@@ -23,7 +23,7 @@ startScripts { ...@@ -23,7 +23,7 @@ startScripts {
applicationDistribution.with { applicationDistribution.with {
into('') { into('') {
from '.' from '../'
include 'README.md' include 'README.md'
include 'NOTICE' include 'NOTICE'
} }
......
...@@ -9,7 +9,6 @@ dependencies { ...@@ -9,7 +9,6 @@ dependencies {
} }
sourceSets { sourceSets {
samples
//TODO don't add to eclipse classpath //TODO don't add to eclipse classpath
samplesJadx { samplesJadx {
java { java {
...@@ -19,14 +18,14 @@ sourceSets { ...@@ -19,14 +18,14 @@ sourceSets {
} }
} }
task samplesRun(type: JavaExec, dependsOn: compileSamplesJava) { task samplesRun(type: JavaExec, dependsOn: compileJava) {
classpath = sourceSets.samples.output classpath = sourceSets.main.output
main = mainSamplesClass main = mainSamplesClass
} }
task samplesJar(type: Jar, dependsOn: samplesRun) { task samplesJar(type: Jar, dependsOn: samplesRun) {
baseName = 'samples' baseName = 'samples'
from sourceSets.samples.output from sourceSets.main.output
} }
task samplesJadxCreate(type: JavaExec, dependsOn: [compileJava, samplesJar]) { task samplesJadxCreate(type: JavaExec, dependsOn: [compileJava, samplesJar]) {
......
include 'jadx-core', 'jadx-cli', 'jadx-gui', 'jadx-samples' include 'jadx-core', 'jadx-samples', 'jadx-cli', 'jadx-gui'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment