Configured jar task to create a fat jar

This commit is contained in:
dankl 2020-01-12 00:29:29 +01:00 committed by dankito
parent 7fb9ff1496
commit c8d1f89964
1 changed files with 19 additions and 1 deletions

View File

@ -1,5 +1,5 @@
apply plugin: 'java-library'
apply plugin: 'kotlin'
apply plugin: 'application'
sourceCompatibility = "1.8"
@ -13,6 +13,11 @@ compileTestKotlin {
}
mainClassName = "net.dankito.banking.ui.javafx.BankingJavaFXApplication"
def title = 'Banking'
dependencies {
api project(':BankingJavaFxControls')
@ -20,3 +25,16 @@ dependencies {
implementation "ch.qos.logback:logback-classic:$logbackVersion"
}
jar {
manifest {
attributes 'Main-Class': mainClassName,
'Implementation-Title': title,
'Implementation-Version': appVersionName
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
}