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()
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.thauvin.erik</groupId>
|
||||
<artifactId>urlencoder</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
<name>UrlEncoder</name>
|
||||
<description>A simple library to encode/decode URL parameters</description>
|
||||
<url>https://github.com/ethauvin/urlencoder</url>
|
||||
|
|
|
@ -32,7 +32,7 @@ import kotlin.system.exitProcess
|
|||
object UrlEncoder {
|
||||
private val hexDigits = "0123456789ABCDEF".toCharArray()
|
||||
internal val usage =
|
||||
"Usage : kotlin -cp urlencoder-*.jar ${UrlEncoder::class.java.name} [-ed] text" + System.lineSeparator() +
|
||||
"Usage : java -jar urlencoder-*all.jar [-ed] text" + System.lineSeparator() +
|
||||
"Encode and decode URL parameters." + System.lineSeparator() + " -e encode (default) " +
|
||||
System.lineSeparator() + " -d decode"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue