Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not create a fat jar with dependencies. #98

Merged
merged 1 commit into from
May 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,11 @@ repositories {
dependencies {
compile fileTree(dir: 'libs', includes: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'org.apache.commons:commons-lang3:3.2.1'
compile 'commons-net:commons-net:3.3'
}

jar {

jar.duplicatesStrategy = DuplicatesStrategy.EXCLUDE
/* Package up all runtime files (our classes and those of dependencies) into
* our JAR. This gets us a sort of poor man's shaded JAR/"fat JAR". */
from (configurations.runtime.files.collect { zipTree(it) }) {
/* We don't want the metadata from any shaded JARs in our output. */
exclude 'META-INF/'
}

manifest {
attributes(
"Created-By": "Neuron Robotics Cooperative",
Expand All @@ -70,7 +61,7 @@ jar {
"Implementation-Version" : props."app.version",
"Implementation-Vendor": "Neuron Robotics Cooperative",
)
instruction 'Import-Package', '!org.apache.commons.*'
instruction 'Import-Package', '*'
}
}

Expand Down