From 0202ca0be66dbd1a2a37fd14e8de2c74b44a02f6 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 18 Oct 2023 21:44:11 -0700 Subject: [PATCH 01/54] Java 20 deprecation cleanup --- .../kotlin/net/thauvin/erik/pinboard/PinboardPoster.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/net/thauvin/erik/pinboard/PinboardPoster.kt b/src/main/kotlin/net/thauvin/erik/pinboard/PinboardPoster.kt index 0b9514d..64fe284 100644 --- a/src/main/kotlin/net/thauvin/erik/pinboard/PinboardPoster.kt +++ b/src/main/kotlin/net/thauvin/erik/pinboard/PinboardPoster.kt @@ -40,8 +40,8 @@ import org.xml.sax.InputSource import java.io.File import java.io.IOException import java.io.StringReader -import java.net.MalformedURLException -import java.net.URL +import java.net.URI +import java.net.URISyntaxException import java.nio.file.Files import java.nio.file.Path import java.time.ZonedDateTime @@ -309,8 +309,8 @@ open class PinboardPoster() { var isValid = url.isNotBlank() if (isValid) { try { - URL(url) - } catch (e: MalformedURLException) { + URI(url) + } catch (e: URISyntaxException) { logger.log(Level.FINE, "Invalid URL: $url", e) isValid = false } From d57070bc59f344674febfdf612e88370b90b11af Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 18 Oct 2023 21:44:45 -0700 Subject: [PATCH 02/54] Updated dependencies --- .idea/misc.xml | 9 ++++++++- build.gradle.kts | 15 +++++++-------- gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 14 +++++++------- pom.xml | 12 +++--------- samples/java/build.gradle | 2 +- .../java/gradle/wrapper/gradle-wrapper.properties | 2 +- samples/java/gradlew | 14 +++++++------- samples/kotlin/build.gradle.kts | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- samples/kotlin/gradlew | 14 +++++++------- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 4ca97d5..2c5ba18 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,7 +1,14 @@ + + - + \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 61463aa..1731417 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,19 +4,19 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { - id("com.github.ben-manes.versions") version "0.48.0" + id("com.github.ben-manes.versions") version "0.49.0" id("io.gitlab.arturbosch.detekt") version "1.23.1" id("java") id("maven-publish") - id("org.jetbrains.dokka") version "1.9.0" - id("org.jetbrains.kotlinx.kover") version "0.7.3" - id("org.sonarqube") version "4.4.0.3356" + id("org.jetbrains.dokka") version "1.9.10" + id("org.jetbrains.kotlinx.kover") version "0.7.4" + id("org.sonarqube") version "4.4.1.3373" id("signing") kotlin("jvm") version "1.9.10" } group = "net.thauvin.erik" -version = "1.1.0" +version = "1.1.1-SNAPSHOT" description = "A small library for posting to Pinboard" val gitHub = "ethauvin/$name" @@ -27,7 +27,7 @@ var isRelease = "release" in gradle.startParameter.taskNames val publicationName = "mavenJava" object Versions { - const val OKHTTP = "4.11.0" + const val OKHTTP = "4.12.0" } fun isNonStable(version: String): Boolean { @@ -46,7 +46,6 @@ dependencies { implementation(platform(kotlin("bom"))) implementation("com.squareup.okhttp3:okhttp:${Versions.OKHTTP}") - implementation("com.squareup.okio:okio:3.5.0") implementation("com.squareup.okhttp3:logging-interceptor:${Versions.OKHTTP}") testImplementation("org.testng:testng:7.8.0") @@ -80,7 +79,7 @@ sonarqube { property("sonar.organization", "ethauvin-github") property("sonar.host.url", "https://sonarcloud.io") property("sonar.sourceEncoding", "UTF-8") - property("sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/kover/report.xml") + property("sonar.coverage.jacoco.xmlReportPaths", "${layout.buildDirectory.get()}/reports/kover/report.xml") } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac72c34..3fa8f86 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 0adc8e1..1aa94a4 100755 --- a/gradlew +++ b/gradlew @@ -145,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -202,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/pom.xml b/pom.xml index 16a6778..762b181 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 4.0.0 net.thauvin.erik pinboard-poster - 1.1.0 + 1.1.1-SNAPSHOT pinboard-poster A small library for posting to Pinboard https://github.com/ethauvin/pinboard-poster @@ -56,19 +56,13 @@ com.squareup.okhttp3 okhttp - 4.11.0 - runtime - - - com.squareup.okio - okio-jvm - 3.5.0 + 4.12.0 runtime com.squareup.okhttp3 logging-interceptor - 4.11.0 + 4.12.0 runtime diff --git a/samples/java/build.gradle b/samples/java/build.gradle index 9b03969..58b1c9a 100644 --- a/samples/java/build.gradle +++ b/samples/java/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.github.ben-manes.versions' version '0.48.0' + id 'com.github.ben-manes.versions' version '0.49.0' id 'java' id 'application' } diff --git a/samples/java/gradle/wrapper/gradle-wrapper.properties b/samples/java/gradle/wrapper/gradle-wrapper.properties index ac72c34..3fa8f86 100644 --- a/samples/java/gradle/wrapper/gradle-wrapper.properties +++ b/samples/java/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/java/gradlew b/samples/java/gradlew index 0adc8e1..1aa94a4 100755 --- a/samples/java/gradlew +++ b/samples/java/gradlew @@ -145,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -202,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/samples/kotlin/build.gradle.kts b/samples/kotlin/build.gradle.kts index 0edfbaf..871668b 100644 --- a/samples/kotlin/build.gradle.kts +++ b/samples/kotlin/build.gradle.kts @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("application") - id("com.github.ben-manes.versions") version "0.48.0" + id("com.github.ben-manes.versions") version "0.49.0" kotlin("jvm") version "1.9.10" } diff --git a/samples/kotlin/gradle/wrapper/gradle-wrapper.properties b/samples/kotlin/gradle/wrapper/gradle-wrapper.properties index ac72c34..3fa8f86 100644 --- a/samples/kotlin/gradle/wrapper/gradle-wrapper.properties +++ b/samples/kotlin/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/kotlin/gradlew b/samples/kotlin/gradlew index 0adc8e1..1aa94a4 100755 --- a/samples/kotlin/gradlew +++ b/samples/kotlin/gradlew @@ -145,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -202,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ From 00f78b75750cccf9e71bda44c49f3718232d968e Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 18 Oct 2023 21:51:53 -0700 Subject: [PATCH 03/54] Updated examples current snapshot dependencies --- samples/java/build.gradle | 2 +- samples/kotlin/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/java/build.gradle b/samples/java/build.gradle index 58b1c9a..036eb59 100644 --- a/samples/java/build.gradle +++ b/samples/java/build.gradle @@ -21,5 +21,5 @@ repositories { } dependencies { - implementation 'net.thauvin.erik:pinboard-poster:1.1.0' + implementation 'net.thauvin.erik:pinboard-poster:1.1.1-SNAPSHOT' } diff --git a/samples/kotlin/build.gradle.kts b/samples/kotlin/build.gradle.kts index 871668b..f9ba35d 100644 --- a/samples/kotlin/build.gradle.kts +++ b/samples/kotlin/build.gradle.kts @@ -16,7 +16,7 @@ repositories { } dependencies { - implementation("net.thauvin.erik:pinboard-poster:1.1.0") + implementation("net.thauvin.erik:pinboard-poster:1.1.1-SNAPSHOT") } java { From 594ca811e3267b3c2256be56a277581b69aa366e Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Thu, 23 Nov 2023 18:01:01 -0800 Subject: [PATCH 04/54] Upgraded to Kotlin 1.9.21 --- .idea/kotlinc.xml | 2 +- .idea/misc.xml | 5 +++++ build.gradle.kts | 6 +++--- pom.xml | 6 +++--- samples/java/build.gradle | 2 +- .../java/net/thauvin/erik/pinboard/samples/JavaExample.java | 1 + samples/kotlin/build.gradle.kts | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 44174d6..83bf06e 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -9,6 +9,6 @@