Minor cleanup

This commit is contained in:
Erik C. Thauvin 2022-12-31 23:20:31 -08:00
parent f5485bf2d5
commit 9af78b38d9
2 changed files with 9 additions and 8 deletions

View file

@ -18,10 +18,11 @@ parameters, not URLs, causing the wrong escape sequences to be used.
Additionally, `java.net.URLEncoder` allocates memory even when no encoding is Additionally, `java.net.URLEncoder` allocates memory even when no encoding is
necessary, significantly impacting performance. This library has a negligible necessary, significantly impacting performance. This library has a negligible
performance impact when the string that is passed in doesn't need to be encoded. performance impact when a specified string doesn't need to be encoded.
Android's [Uri.encode](https://developer.android.com/reference/android/net/Uri#encode(java.lang.String,%20java.lang.String)) Android's [Uri.encode](https://developer.android.com/reference/android/net/Uri#encode(java.lang.String,%20java.lang.String))
also addresses these issues. also addresses these issues, but does not currently support [unicode surrogate pairs](https://learn.microsoft.com/en-us/globalization/encoding/surrogate-pairs).
## Examples (TL;DR) ## Examples (TL;DR)

View file

@ -7,10 +7,10 @@ plugins {
} }
group = "com.uwyn" group = "com.uwyn"
version = "1.0.1-SNAPSHOT"
base { base {
archivesName.set("urlencoder") archivesName.set(rootProject.name)
version = "1.0.1-SNAPSHOT"
} }
java { java {
@ -51,11 +51,11 @@ tasks.named<Test>("test") {
publishing { publishing {
publications { publications {
create<MavenPublication>("mavenJava") { create<MavenPublication>("mavenJava") {
artifactId = "urlencoder" artifactId = rootProject.name
from(components["java"]) from(components["java"])
pom { pom {
name.set("URL Encoder") name.set("URLEncoder")
description.set("A simple library to encode/decode URL parameters.") description.set("A simple library to encode/decode URL parameters")
url.set("https://github.com/gbevin/urlencoder") url.set("https://github.com/gbevin/urlencoder")
licenses { licenses {
license { license {
@ -99,4 +99,4 @@ publishing {
signing { signing {
sign(publishing.publications["mavenJava"]) sign(publishing.publications["mavenJava"])
} }