build.gradle 2.4 KB
Newer Older
S
Skylot 已提交
1
plugins {
S
Skylot 已提交
2
	id 'application'
3
	id 'edu.sc.seis.launch4j' version '2.5.0'
4
	id 'com.github.johnrengelman.shadow' version '6.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'
12
	implementation 'ch.qos.logback:logback-classic:1.2.3'
13

14
	implementation 'com.fifesoft:rsyntaxtextarea:3.1.2'
15 16
	implementation files('libs/jfontchooser-1.0.5.jar')
	implementation 'hu.kazocsaba:image-viewer:1.2.3'
17

18
	implementation 'com.google.code.gson:gson:2.8.6'
S
Skylot 已提交
19
	implementation 'org.apache.commons:commons-lang3:3.12.0'
S
Skylot 已提交
20
	implementation 'org.apache.commons:commons-text:1.9'
21

S
Skylot 已提交
22
	implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
23
	implementation "com.github.akarnokd:rxjava2-swing:0.3.7"
24
	implementation 'com.android.tools.build:apksig:4.1.3'
25
	implementation 'io.github.hqktech:jdwp:1.0'
S
Skylot 已提交
26 27 28
}

application {
S
Skylot 已提交
29
	applicationName = 'jadx-gui'
30
	mainClass.set('jadx.gui.JadxGUI')
S
Skylot 已提交
31 32 33
}

applicationDistribution.with {
S
Skylot 已提交
34 35 36 37 38 39
	into('') {
		from '../'
		include 'README.md'
		include 'NOTICE'
		include 'LICENSE'
	}
S
Skylot 已提交
40 41
}

42
jar {
S
Skylot 已提交
43 44
	manifest {
		attributes(
45
				"Main-Class": application.mainClass.get(),
46
				"Class-Path": configurations.runtimeClasspath.collect { it.getName() }.join(' ')
S
Skylot 已提交
47 48
		)
	}
S
Skylot 已提交
49 50
}

51 52 53
shadow {
	mainClassName = application.mainClass.get()
}
54 55 56 57
shadowJar {
	mergeServiceFiles()
}

S
Skylot 已提交
58
startScripts {
S
Skylot 已提交
59 60 61 62 63 64 65 66
	// 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
	}
67 68
}

S
Skylot 已提交
69
launch4j {
70
	mainClassName = application.mainClass.get()
S
Skylot 已提交
71
	copyConfigurable = project.tasks.shadowJar.outputs.files
72
	jarTask = project.tasks.shadowJar
S
Skylot 已提交
73 74 75 76 77 78 79 80
	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"
81
	bundledJre64Bit = true
S
Skylot 已提交
82 83 84 85
	initialHeapPercent = 5
	maxHeapSize = 4096
	maxHeapPercent = 70
	downloadUrl = 'https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot#x64_win'
86
	bundledJrePath = '%JAVA_HOME%'
S
Skylot 已提交
87
}