Skip to content

Instantly share code, notes, and snippets.

@fanyer
Forked from TurekBot/build.gradle
Created May 14, 2019 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fanyer/4cec8a435f5e2e3119958f865d209669 to your computer and use it in GitHub Desktop.
Save fanyer/4cec8a435f5e2e3119958f865d209669 to your computer and use it in GitHub Desktop.
Gradle Shadow Example
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