add fat jar compile mode

This commit is contained in:
Wieland Schöbl
2020-08-14 01:50:04 +02:00
parent a9e5aceb96
commit d6a3691756
14 changed files with 224 additions and 47 deletions

View File

@@ -26,4 +26,22 @@ compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
jar {
manifest {
attributes('Main-Class': 'de.wulkanat.MainKt')
}
}
task fatJar(type: Jar) {
baseName = project.name + '-all'
from((configurations.compile.findAll { !it.path.endsWith(".pom") }).collect {
it.isDirectory() ? it : zipTree(it)
})
with jar
manifest {
attributes 'Main-Class': 'de.wulkanat.MainKt',
'Implementation-Version': version
}
}
apply plugin: 'kotlinx-serialization'