Created
April 29, 2017 12:29
-
-
Save grimrose/1259d22acc51a07a97664316ca7d5a42 to your computer and use it in GitHub Desktop.
shadow + launch4j plugin study
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
maven { | |
url "https://plugins.gradle.org/m2/" | |
} | |
} | |
dependencies { | |
classpath 'gradle.plugin.edu.sc.seis.gradle:launch4j:2.3.0' | |
classpath "com.github.jengelman.gradle.plugins:shadow:1.2.4" | |
} | |
} | |
apply plugin: 'groovy' | |
apply plugin: 'application' | |
apply plugin: 'edu.sc.seis.launch4j' | |
apply plugin: "com.github.johnrengelman.shadow" | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
compile 'org.codehaus.groovy:groovy-all:2.4.10' | |
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25' | |
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3' | |
} | |
mainClassName = 'org.grimrose.sandbox.groovy.Main' | |
shadowJar { | |
baseName = project.name | |
} | |
launch4j { | |
copyConfigurable = project.tasks.shadowJar.outputs.files | |
jar = "lib/${project.tasks.shadowJar.archiveName}" | |
headerType = 'console' | |
} | |
task createZip(type: Zip) { | |
classifier = distZip.classifier | |
from "${project.buildDir}/${launch4j.outputDir}/${project.name}.exe" | |
} | |
createZip.dependsOn createExe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment