Gradle build improvements

This commit is contained in:
Emux
2018-12-09 15:56:37 +02:00
parent 41d5d21bc6
commit 01958b7d34
2 changed files with 13 additions and 3 deletions

View File

@@ -29,3 +29,13 @@ run {
args project.getProperty("args").split(",")
}
}
task fatJar(type: Jar, dependsOn: classes) {
classifier = 'jar-with-dependencies'
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
exclude 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.SF'
manifest {
attributes 'Main-Class': "${mainClassName}"
}
with jar
}