-
-
Save imranansari/e842019cf95944da1e3dd1375757f2e4 to your computer and use it in GitHub Desktop.
Gradle Shadow Example
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
group 'com.github.yourusername' | |
version '1.0-SNAPSHOT' | |
//These are dependencies that have to do with just the build. See: https://stackoverflow.com/a/23627293/5432315 | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
//This is necessary to use the gradle shadow plugin | |
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2' | |
} | |
} | |
apply plugin: 'java' | |
apply plugin: 'com.github.johnrengelman.shadow' | |
sourceCompatibility = 1.8 | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
//Add your dependencies here following this format | |
compile group: 'org.controlsfx', name: 'controlsfx', version: '8.40.14' | |
} | |
//This lets the shadow plugin know which is the main class | |
jar { | |
manifest { | |
attributes 'Main-Class': 'com.example.Main' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment