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

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

10 11 12
	implementation(project(":jadx-cli"))
	implementation 'com.beust:jcommander:1.78'
	implementation 'ch.qos.logback:logback-classic:1.2.3'
13

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

18 19 20 21 22 23 24
	implementation 'com.google.code.gson:gson:2.8.6'
	implementation 'org.apache.commons:commons-lang3:3.10'
	implementation 'org.apache.commons:commons-text:1.8'

	implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
	implementation "com.github.akarnokd:rxjava2-swing:0.3.7"
	implementation 'com.android.tools.build:apksig:4.0.0'
S
Skylot 已提交
25 26 27
}

application {
S
Skylot 已提交
28 29
	applicationName = 'jadx-gui'
	mainClassName = 'jadx.gui.JadxGUI'
S
Skylot 已提交
30 31 32
}

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

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

50 51 52 53
shadowJar {
	mergeServiceFiles()
}

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

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

85
test {
S
Skylot 已提交
86 87 88
	jacoco {
		enabled = false
	}
89
}