build.gradle 2.4 KB
Newer Older
S
Skylot 已提交
1
plugins {
S
Skylot 已提交
2
	id 'application'
3 4
	id 'edu.sc.seis.launch4j' version '2.4.9'
	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 25
	implementation 'com.android.tools.build:apksig:4.1.1'
	implementation 'io.github.hqktech:jdwp:1.0'
S
Skylot 已提交
26 27 28
}

application {
S
Skylot 已提交
29 30
	applicationName = 'jadx-gui'
	mainClassName = '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 45
	manifest {
		attributes(
				"Main-Class": mainClassName,
46
				"Class-Path": configurations.runtimeClasspath.collect { it.getName() }.join(' ')
S
Skylot 已提交
47 48
		)
	}
S
Skylot 已提交
49 50
}

51 52 53 54
shadowJar {
	mergeServiceFiles()
}

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

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