Skip to content

Instantly share code, notes, and snippets.

@TurekBot
Created January 10, 2018 17:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save TurekBot/4a3cd406cb52dfd8bfb8022b982f0f6c to your computer and use it in GitHub Desktop.
Save TurekBot/4a3cd406cb52dfd8bfb8022b982f0f6c 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