Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
c59b65e7
Commit
c59b65e7
authored
Sep 28, 2013
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: add 'dist' task
parent
bd4c61d3
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
39 deletions
+43
-39
.travis.yml
.travis.yml
+1
-1
README.md
README.md
+8
-8
build.gradle
build.gradle
+13
-7
Consts.java
jadx-core/src/main/java/jadx/core/Consts.java
+1
-3
Jadx.java
jadx-core/src/main/java/jadx/core/Jadx.java
+20
-0
Utils.java
jadx-core/src/main/java/jadx/core/utils/Utils.java
+0
-20
No files found.
.travis.yml
View file @
c59b65e7
...
...
@@ -3,7 +3,7 @@ jdk:
-
oraclejdk7
-
openjdk7
-
openjdk6
script
:
gradle clean build
samples
script
:
gradle clean build
notifications
:
email
:
-
skylot@gmail.com
README.md
View file @
c59b65e7
...
...
@@ -16,7 +16,7 @@ Latest version available at
git clone https://github.com/skylot/jadx.git
cd jadx
./gradlew
clean build
./gradlew
dist
(on Windows, use
`gradlew.bat`
instead of
`./gradlew`
)
...
...
@@ -40,7 +40,7 @@ options:
-d, --output-dir - output directory
-j, --threads-count - processing threads count
-f, --fallback - make simple dump (using goto instead of 'if', 'for', etc)
--cfg
- save methods control flow graph
--cfg
- save methods control flow graph to dot file
--raw-cfg - save methods control flow graph (use raw instructions)
-v, --verbose - verbose output
-h, --help - print this help
...
...
build.gradle
View file @
c59b65e7
...
...
@@ -12,17 +12,18 @@ subprojects {
gradle
.
projectsEvaluated
{
tasks
.
withType
(
Compile
)
{
if
(!
"${it}"
.
contains
(
":jadx-samples:"
))
{
options
.
compilerArgs
<<
"-Xlint"
<<
"-Xlint:unchecked"
<<
"-Xlint:deprecation"
}
}
}
jar
{
version
=
jadxVersion
}
manifest
{
mainAttributes
(
'jadx-version'
:
jadxVersion
)
}
}
dependencies
{
compile
'org.slf4j:slf4j-api:1.7.5'
...
...
@@ -48,10 +49,16 @@ task pack(type: Zip, dependsOn: copyArtifacts) {
from
copyArtifacts
.
destinationDir
}
task
build
(
dependsOn:
pack
)
{
task
dist
(
dependsOn:
pack
)
{
description
=
'Build jadx distribution zip'
}
task
samples
(
dependsOn:
'jadx-samples:samples'
)
{
}
task
build
(
dependsOn:
[
dist
,
samples
])
{
}
task
clean
(
type:
Delete
)
{
delete
buildDir
}
...
...
@@ -59,4 +66,3 @@ task clean(type: Delete) {
task
wrapper
(
type:
Wrapper
)
{
gradleVersion
=
'1.8'
}
jadx-core/src/main/java/jadx/core/Consts.java
View file @
c59b65e7
package
jadx
.
core
;
import
jadx.core.utils.Utils
;
public
class
Consts
{
public
static
final
String
JADX_VERSION
=
Utils
.
getJadx
Version
();
public
static
final
String
JADX_VERSION
=
Jadx
.
get
Version
();
public
static
final
boolean
DEBUG
=
false
;
...
...
jadx-core/src/main/java/jadx/core/Jadx.java
View file @
c59b65e7
...
...
@@ -19,10 +19,15 @@ import jadx.core.dex.visitors.regions.ProcessVariables;
import
jadx.core.dex.visitors.regions.RegionMakerVisitor
;
import
jadx.core.dex.visitors.typeresolver.FinishTypeResolver
;
import
jadx.core.dex.visitors.typeresolver.TypeResolver
;
import
jadx.core.utils.Utils
;
import
java.io.File
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util.jar.Manifest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -73,4 +78,19 @@ public class Jadx {
passes
.
add
(
new
CodeGen
(
args
));
return
passes
;
}
public
static
String
getVersion
()
{
try
{
Enumeration
<
URL
>
resources
=
Utils
.
class
.
getClassLoader
().
getResources
(
"META-INF/MANIFEST.MF"
);
while
(
resources
.
hasMoreElements
())
{
Manifest
manifest
=
new
Manifest
(
resources
.
nextElement
().
openStream
());
String
ver
=
manifest
.
getMainAttributes
().
getValue
(
"jadx-version"
);
if
(
ver
!=
null
)
return
ver
;
}
}
catch
(
IOException
e
)
{
LOG
.
error
(
"Can't get manifest file"
,
e
);
}
return
"dev"
;
}
}
jadx-core/src/main/java/jadx/core/utils/Utils.java
View file @
c59b65e7
...
...
@@ -3,14 +3,10 @@ package jadx.core.utils;
import
jadx.core.utils.exceptions.JadxRuntimeException
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
import
java.net.URL
;
import
java.util.Enumeration
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.jar.Manifest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -126,22 +122,6 @@ public class Utils {
return
end
;
}
public
static
String
getJadxVersion
()
{
try
{
Enumeration
<
URL
>
resources
=
Utils
.
class
.
getClassLoader
().
getResources
(
"META-INF/MANIFEST.MF"
);
while
(
resources
.
hasMoreElements
())
{
Manifest
manifest
=
new
Manifest
(
resources
.
nextElement
().
openStream
());
String
ver
=
manifest
.
getMainAttributes
().
getValue
(
"jadx-version"
);
if
(
ver
!=
null
)
return
ver
;
}
}
catch
(
IOException
e
)
{
LOG
.
error
(
"Can't get manifest file"
,
e
);
}
return
"dev"
;
}
public
static
void
makeDirsForFile
(
File
file
)
{
File
dir
=
file
.
getParentFile
();
if
(!
dir
.
exists
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment