build.gradle 2.7 KB
Newer Older
S
Skylot 已提交
1
plugins {
S
Skylot 已提交
2
	id 'application'
S
Skylot 已提交
3 4
	id 'edu.sc.seis.launch4j' version '2.5.1'
	id 'com.github.johnrengelman.shadow' version '7.1.0'
S
Skylot 已提交
5 6
}

S
Skylot 已提交
7
dependencies {
8
	implementation(project(':jadx-core'))
S
Skylot 已提交
9

10
	implementation(project(":jadx-cli"))
S
Skylot 已提交
11
	implementation 'com.beust:jcommander:1.81'
S
Skylot 已提交
12
	implementation 'ch.qos.logback:logback-classic:1.2.6'
13

S
Skylot 已提交
14
	implementation 'com.fifesoft:rsyntaxtextarea:3.1.3'
15 16
	implementation files('libs/jfontchooser-1.0.5.jar')
	implementation 'hu.kazocsaba:image-viewer:1.2.3'
17

S
Skylot 已提交
18 19 20
	implementation 'com.formdev:flatlaf:1.6.1'
	implementation 'com.formdev:flatlaf-intellij-themes:1.6.1'
	implementation 'com.formdev:flatlaf-extras:1.6.1'
21
	implementation 'com.formdev:svgSalamander:1.1.2.4'
S
Skylot 已提交
22
	implementation 'org.reflections:reflections:0.10.2'
23

S
Skylot 已提交
24
	implementation 'com.google.code.gson:gson:2.8.9'
S
Skylot 已提交
25
	implementation 'org.apache.commons:commons-lang3:3.12.0'
S
Skylot 已提交
26
	implementation 'org.apache.commons:commons-text:1.9'
27

S
Skylot 已提交
28
	implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
29
	implementation "com.github.akarnokd:rxjava2-swing:0.3.7"
S
Skylot 已提交
30
	implementation 'com.android.tools.build:apksig:4.2.1'
31
	implementation 'io.github.hqktech:jdwp:1.0'
S
Skylot 已提交
32 33 34
}

application {
S
Skylot 已提交
35
	applicationName = 'jadx-gui'
36
	mainClass.set('jadx.gui.JadxGUI')
S
Skylot 已提交
37 38 39
}

applicationDistribution.with {
S
Skylot 已提交
40 41 42 43 44 45
	into('') {
		from '../'
		include 'README.md'
		include 'NOTICE'
		include 'LICENSE'
	}
S
Skylot 已提交
46 47
}

48
jar {
S
Skylot 已提交
49 50
	manifest {
		attributes(
51
				"Main-Class": application.mainClass.get(),
52
				"Class-Path": configurations.runtimeClasspath.collect { it.getName() }.join(' ')
S
Skylot 已提交
53 54
		)
	}
S
Skylot 已提交
55 56
}

57 58 59
shadow {
	mainClassName = application.mainClass.get()
}
60 61 62 63
shadowJar {
	mergeServiceFiles()
}

S
Skylot 已提交
64
startScripts {
S
Skylot 已提交
65 66 67 68 69 70 71 72
	// The option -XX:+UseG1GC is only relevant for Java 8. Starting with Java 9 G1GC is already the default GC
	defaultJvmOpts = ['-Xms128M', '-Xmx4g', '-Dawt.useSystemAAFontSettings=lcd', '-Dswing.aatext=true', '-XX:+UseG1GC']
	doLast {
		def str = windowsScript.text
		str = str.replaceAll('java.exe', 'javaw.exe')
		str = str.replaceAll('"%JAVA_EXE%" %DEFAULT_JVM_OPTS%', 'start "jadx-gui" /B "%JAVA_EXE%" %DEFAULT_JVM_OPTS%')
		windowsScript.text = str
	}
73 74
}

S
Skylot 已提交
75
launch4j {
76
	mainClassName = application.mainClass.get()
S
Skylot 已提交
77
	copyConfigurable = project.tasks.shadowJar.outputs.files
78
	jarTask = project.tasks.shadowJar
S
Skylot 已提交
79 80 81 82 83 84 85 86
	icon = "${projectDir}/src/main/resources/logos/jadx-logo.ico"
	outfile = "jadx-gui-${version}.exe"
	copyright = 'Skylot'
	windowTitle = 'jadx'
	companyName = 'jadx'
	jreMinVersion = '1.8.0'
	jvmOptions = ['-Dawt.useSystemAAFontSettings=lcd', '-Dswing.aatext=true', '-XX:+UseG1GC']
	jreRuntimeBits = "64"
87
	bundledJre64Bit = true
S
Skylot 已提交
88 89 90 91
	initialHeapPercent = 5
	maxHeapSize = 4096
	maxHeapPercent = 70
	downloadUrl = 'https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot#x64_win'
92
	bundledJrePath = '%JAVA_HOME%'
S
Skylot 已提交
93
}