build.gradle 1.6 KB
Newer Older
S
Skylot 已提交
1 2 3 4 5
plugins {
    id 'edu.sc.seis.launch4j' version '2.4.3'
    id 'com.github.johnrengelman.shadow' version '2.0.2'
}

S
Skylot 已提交
6 7
apply plugin: 'application'

S
Skylot 已提交
8
mainClassName = 'jadx.gui.JadxGUI'
S
Skylot 已提交
9 10 11 12

dependencies {
    compile(project(":jadx-core"))
    compile(project(":jadx-cli"))
13
    compile 'com.fifesoft:rsyntaxtextarea:2.6.1'
S
Skylot 已提交
14
    compile 'com.google.code.gson:gson:2.8.2'
S
Skylot 已提交
15
    compile files('libs/jfontchooser-1.0.5.jar')
S
Skylot 已提交
16
    compile 'hu.kazocsaba:image-viewer:1.2.3'
S
Skylot 已提交
17 18 19 20
}

applicationDistribution.with {
    into('') {
S
Skylot 已提交
21
        from '../'
S
Skylot 已提交
22 23
        include 'README.md'
        include 'NOTICE'
S
Skylot 已提交
24
        include 'LICENSE'
S
Skylot 已提交
25 26 27
    }
}

28 29 30
jar {
    manifest {
        attributes(
S
Skylot 已提交
31 32 33 34 35 36 37
                "Main-Class": mainClassName,
                "Class-Path": configurations.compile.collect { it.getName() }.join(' ')
        )
    }
}

startScripts {
38
    defaultJvmOpts = [ '-Xms128M', '-Xmx4g' ]
S
Skylot 已提交
39 40 41 42 43 44
    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
45 46 47
    }
}

S
Skylot 已提交
48 49 50 51 52 53 54 55 56 57 58 59 60 61
launch4j {
    mainClassName = 'jadx.gui.JadxGUI'
    copyConfigurable = project.tasks.shadowJar.outputs.files
    jar = "lib/${project.tasks.shadowJar.archiveName}"
//  icon = "${projectDir}/icons/myApp.ico"
    outfile = "jadx-gui-${version}.exe"
    copyright = 'Skylot'
    windowTitle = 'jadx'
    jreRuntimeBits = "64"
    initialHeapPercent = 5
    maxHeapSize = 4096
    maxHeapPercent = 70
}

62 63 64 65 66
test {
    jacoco {
        enabled = false
    }
}