Gradle build improvements

This commit is contained in:
Emux 2018-12-09 15:56:37 +02:00
parent 41d5d21bc6
commit 01958b7d34
No known key found for this signature in database
GPG Key ID: 64ED9980896038C3
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
}

View File

@ -32,14 +32,14 @@ sourceSets {
}
}
mainClassName = "org.oscim.theme.comparator.Main"
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': 'org.oscim.theme.comparator.Main')
attributes 'Main-Class': "${mainClassName}"
}
with jar
}
mainClassName = "org.oscim.theme.comparator.Main"