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
e74cd445
Commit
e74cd445
authored
Feb 07, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aar格式文件导出为gradle失败
parent
c52f0dbb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
12 deletions
+21
-12
build.gradle
jadx-cli/build.gradle
+1
-1
ExportGradleProject.java
...e/src/main/java/jadx/core/export/ExportGradleProject.java
+8
-7
TemplateFile.java
jadx-core/src/main/java/jadx/core/export/TemplateFile.java
+11
-3
build.gradle
jadx-gui/build.gradle
+1
-1
No files found.
jadx-cli/build.gradle
View file @
e74cd445
...
...
@@ -11,7 +11,7 @@ dependencies {
application
{
applicationName
=
'jadx'
mainClassName
=
'jadx.cli.JadxCLI'
applicationDefaultJvmArgs
=
[
'-Xms
128M'
,
'-Xmx4
g'
,
'-XX:+UseG1GC'
]
applicationDefaultJvmArgs
=
[
'-Xms
8g'
,
'-Xmx16
g'
,
'-XX:+UseG1GC'
]
}
applicationDistribution
.
with
{
...
...
jadx-core/src/main/java/jadx/core/export/ExportGradleProject.java
View file @
e74cd445
...
...
@@ -3,6 +3,9 @@ package jadx.core.export;
import
net.dongliu.apk.parser.ApkFile
;
import
net.dongliu.apk.parser.bean.ApkMeta
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Arrays
;
...
...
@@ -10,9 +13,6 @@ import java.util.HashSet;
import
java.util.List
;
import
java.util.Set
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
jadx.core.dex.attributes.AFlag
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.core.dex.nodes.DexNode
;
...
...
@@ -73,10 +73,10 @@ public class ExportGradleProject {
}
}
if
(
apkMeta
!=
null
)
{
tmpl
.
add
(
"applicationId"
,
apkMeta
.
getPackageName
());
tmpl
.
add
(
"minSdkVersion"
,
apkMeta
.
getMinSdkVersion
());
tmpl
.
add
(
"targetSdkVersion"
,
apkMeta
.
getTargetSdkVersion
());
tmpl
.
add
(
"compileSdkVersion"
,
apkMeta
.
getTargetSdkVersion
());
tmpl
.
add
(
"applicationId"
,
apkMeta
.
getPackageName
()
,
appPackage
);
tmpl
.
add
(
"minSdkVersion"
,
apkMeta
.
getMinSdkVersion
()
,
9
);
tmpl
.
add
(
"targetSdkVersion"
,
apkMeta
.
getTargetSdkVersion
()
,
21
);
tmpl
.
add
(
"compileSdkVersion"
,
apkMeta
.
getTargetSdkVersion
()
,
21
);
}
else
{
tmpl
.
add
(
"applicationId"
,
appPackage
);
tmpl
.
add
(
"minSdkVersion"
,
9
);
...
...
@@ -86,6 +86,7 @@ public class ExportGradleProject {
tmpl
.
save
(
new
File
(
outDir
,
"build.gradle"
));
}
private
void
skipGeneratedClasses
()
{
for
(
DexNode
dexNode
:
root
.
getDexNodes
())
{
List
<
ClassNode
>
classes
=
dexNode
.
getClasses
();
...
...
jadx-core/src/main/java/jadx/core/export/TemplateFile.java
View file @
e74cd445
package
jadx
.
core
.
export
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
import
java.io.BufferedInputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
...
...
@@ -11,9 +14,6 @@ import java.io.OutputStream;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
import
jadx.core.utils.exceptions.JadxRuntimeException
;
import
static
jadx
.
core
.
utils
.
files
.
FileUtils
.
close
;
...
...
@@ -55,6 +55,14 @@ public class TemplateFile {
values
.
put
(
name
,
value
.
toString
());
}
public
void
add
(
String
name
,
Object
value
,
Object
defaultValue
)
{
if
(
value
==
null
)
{
add
(
name
,
defaultValue
);
}
else
{
add
(
name
,
value
);
}
}
public
String
build
()
throws
IOException
{
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
try
{
...
...
jadx-gui/build.gradle
View file @
e74cd445
...
...
@@ -45,7 +45,7 @@ jar {
startScripts
{
// The option -XX:+UseG1GC is only relevant for Java 8. Starting with Java 9 G1GC is already the default GC
defaultJvmOpts
=
[
'-Xmx8g'
,
'-Xmx1
2
g'
,
'-Dawt.useSystemAAFontSettings=lcd'
,
'-Dswing.aatext=true'
,
'-XX:+UseG1GC'
]
defaultJvmOpts
=
[
'-Xmx8g'
,
'-Xmx1
6
g'
,
'-Dawt.useSystemAAFontSettings=lcd'
,
'-Dswing.aatext=true'
,
'-XX:+UseG1GC'
]
doLast
{
def
str
=
windowsScript
.
text
str
=
str
.
replaceAll
(
'java.exe'
,
'javaw.exe'
)
...
...
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