Added fatJar task and standalone instructions
This commit is contained in:
parent
ac5f8e5334
commit
b9c1449d55
4 changed files with 60 additions and 3 deletions
|
@ -23,7 +23,7 @@ plugins {
|
|||
|
||||
description = "A simple library to encode/decode URL parameters"
|
||||
group = "net.thauvin.erik"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1-SNAPSHOT"
|
||||
|
||||
|
||||
val mavenName = "UrlEncoder"
|
||||
|
@ -81,6 +81,22 @@ tasks {
|
|||
}
|
||||
}
|
||||
|
||||
val fatJar = register<Jar>("fatJar") {
|
||||
group = "build"
|
||||
dependsOn.addAll(listOf("compileJava", "compileKotlin", "processResources"))
|
||||
archiveClassifier.set("all")
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
manifest { attributes(mapOf("Main-Class" to application.mainClass)) }
|
||||
val sourcesMain = sourceSets.main.get()
|
||||
val contents = configurations.runtimeClasspath.get()
|
||||
.map { if (it.isDirectory) it else zipTree(it) } + sourcesMain.output
|
||||
from(contents)
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(fatJar)
|
||||
}
|
||||
|
||||
withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions.jvmTarget = java.targetCompatibility.toString()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue