From 2b284199bb048993f0517184ef2ba840b8b2bbfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rg=20Prante?= Date: Fri, 14 Sep 2018 16:50:36 +0200 Subject: [PATCH] update to gradle 4.9, README --- README.adoc | 48 +++++++++++++++++++++-- build.gradle | 12 ++++-- gradle/wrapper/gradle-wrapper.jar | Bin 54417 -> 54413 bytes gradle/wrapper/gradle-wrapper.properties | 4 +- 4 files changed, 55 insertions(+), 9 deletions(-) diff --git a/README.adoc b/README.adoc index 1ae72ec..b8002f3 100644 --- a/README.adoc +++ b/README.adoc @@ -1,6 +1,4 @@ -# Network classes for Java - -## Net-url: Uniform Resource Locator implementation +# A consolidated Uniform Resource Locator implementation for Java image:https://api.travis-ci.org/xbib/net-url.svg[title="Build status", link="https://travis-ci.org/xbib/net-url/"] image:https://img.shields.io/sonar/http/nemo.sonarqube.com/org.xbib%3Anet/coverage.svg?style=flat-square[title="Coverage", link="https://sonarqube.com/dashboard/index?id=org.xbib%3Anet-url"] @@ -8,6 +6,50 @@ image:https://maven-badges.herokuapp.com/maven-central/org.xbib/net-url/badge.sv image:https://img.shields.io/badge/License-Apache%202.0-blue.svg[title="Apache License 2.0", link="https://opensource.org/licenses/Apache-2.0"] image:https://img.shields.io/twitter/url/https/twitter.com/xbib.svg?style=social&label=Follow%20%40xbib[title="Twitter", link="https://twitter.com/xbib"] +A Uniform Resource Locator (URL) is a compact representation of the +location and access method for a resource available via the Internet. + +Historically, there are many different forms of internet resource representations, for example, +the URL (RFC 1738 as of 1994), the URI (RFC 2396 as of 1998), and IRI (RFC 3987 as of 2005), +and most of them have updated specifications. + +This Java implementation serves as a universal point of handling all +different forms. It follows the syntax of the Uniform Resource Identifier (RFC 3986) +in accordance with the https://url.spec.whatwg.org/[WHATWG URL standard]. + +This alternative implementation of Uniform Resource Locator combines the features of the vanilla URI/URL Java SDK implementations +but removes it peculiarities and deficiencies, such as `java.lang.IllegalArgumentException: Illegal character in path at ... at java.net.URI.create()` + +Normalization, NIO charset encoding/decoding, IPv6, an extensive set of schemes, and path matching have been added. + +Fast building and parsing URLs, improved percent decoding/encoding, and URI templating features are included, to make +this library also useful in URI and IRI contexts. + +While parsing and building, you have better control about address resolving. Only explicit `resolveFromhost` methods +will execute host lookup queries against DNS resolvers, otherwise, no resolving will occur under the hood. + +You can build URLs with a fluent API, for example + +``` +URL.http().host("foo.com").toUrlString() +``` + +And you can parse URLs with a fluent API, for exmaple + +``` +URL url = URL.parser().parse("file:///foo/bar?foo=bar#fragment"); +``` + +There is no external dependency. The size of the jar library is ~118k. The only dependency on `java.net` are the classes + +``` +java.net.IDN +java.net.Inet4Address +java.net.Inet6Address +java.net.InetAddress +``` + +which might get re-implemented in another library at a later time, in a project like Netty DNS resolver. # License diff --git a/build.gradle b/build.gradle index 6d6d928..440fb9a 100644 --- a/build.gradle +++ b/build.gradle @@ -45,10 +45,14 @@ subprojects { wagon "org.apache.maven.wagon:wagon-ssh:${project.property('wagon.version')}" } - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - - [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' + compileJava { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + compileTestJava { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:all,-serial" << "-profile" << "compact1" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 758de960ec7947253b058ff79c88ce51f3abe08a..0d4a9516871afd710a9d84d89e31ba77745607bd 100644 GIT binary patch delta 732 zcmYk4Ur19?9LINl)~4m3n;~1*r8tRj;+ldsTG*&j;mD0LiLwYROK2iKWQ|?~A0o3h zzap4_7J?6pUPQ=BD%&6DHm6Q~$R4bh2%#5!>&Z@s+uDW0{d~^%+{^czdwqed{y>)Z zc+T&yL!MJAm8!{SYf|rYZFe!1SDt!vF<7`q<#K4UACyiSVEQmpTWJ* zCH4Yyp=$OKJ0T0(LXSg>)8PuzGk9Y~a55RAVIwuGg?b~|_z|w56PmQvMb6Mjj-nRY z(x#K25gTpjgx1eD(Bo2p{&_ncGbpGYh+64zl`vOT0mdT|v?eK+msKu}NrWG2H3&p& z=t-@jdDx8_DRo|`ZJ~~CIRy4EIH}`;f_VcmGv8lz>^k${dF(1Rx9~&{Z%aNJQWB2D zW!4H?+{J?M#ZR(rEX8loqq`_*JA`wIMk;e7)u+cbw-)h)k!CuCwj@e%v@^4%wo?S{ zi*>97FBdP?lmGw# delta 674 zcmYk)T}V@590u^ce`_BwX^}IxS%%_;lVr!`V#{7~K>D!@P~?^<`NH4(Ing@BclV!#Ts#S?=kqkqXuP zh4b|_GMTK^ZEaC})BWsS?`2rD8(zFT^*$$2zD;)0rchoVsqNJAp+Rb5f&VDlMi zQYES(UnQk?Z>@gyS?N=rh)4VlG+4lCz=!dlOI4&Q6MV!u zbVzV*se)1`1TBHXk#o* z@F>~s=(iW+T*%107!Fxz!;Wl6Iev$X)Yr|aLv6T;iY{T%osXGt4SR+4a4YGYqG)!i z`5iSFi0EnGRbCZgAz~)AORzt>9ZfDROi?2}zLBXcG2Lu~p&2;mQ;Ja8o z&D|9&iPzEWJ