Compare commits

...

10 commits

Author SHA1 Message Date
e681d92806
Version 1.1.0 2025-03-16 22:36:30 -07:00
ae1be9c116
Version 1.0.2 2025-03-16 22:21:27 -07:00
7b91dae989
Update copyright 2025-03-16 22:18:17 -07:00
18efaffed4
Make sure the connection is always disconnected 2025-03-16 22:17:29 -07:00
ef57893a51
Bump JUnit to version 5.12.1 2025-03-16 22:17:03 -07:00
90fae2fada
Bump UrlEncoder to version 1.6.0 2025-03-16 22:16:40 -07:00
0031396e3b
Update extension dependencies
Bump Detekt to version 0.9.9
Bump Dokka to version 1.0.3
Bump Jacoco Report to version 0.9.9
2025-03-16 22:15:42 -07:00
6ea7f6a07a
Bump Kotlin to version 2.1.10 2025-03-16 22:11:55 -07:00
7480ddff2a
Bump Gradle to version 8.13 2025-03-16 22:10:34 -07:00
678143ee11
Bump bld to version 2.1.0 2025-03-16 22:09:16 -07:00
23 changed files with 58 additions and 55 deletions

View file

@ -21,7 +21,7 @@ commands:
- sdkman/setup-sdkman
- sdkman/sdkman-install:
candidate: kotlin
version: 2.0.20
version: 2.1.10
- run:
name: Download dependencies
command: ./bld download
@ -46,11 +46,11 @@ jobs:
steps:
- build_and_test
bld_jdk20:
bld_jdk21:
<<: *defaults
docker:
- image: cimg/openjdk:20.0
- image: cimg/openjdk:21.0
steps:
- build_and_test
@ -59,4 +59,4 @@ workflows:
bld:
jobs:
- bld_jdk17
- bld_jdk20
- bld_jdk21

View file

@ -13,8 +13,8 @@ jobs:
strategy:
matrix:
java-version: [17, 21, 22]
kotlin-version: [1.19.24, 2.0.20]
java-version: [17, 21, 23]
kotlin-version: [1.9.25, 2.1.10]
steps:
- name: Checkout source repository

View file

@ -2,12 +2,12 @@
<library name="bld">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0-sources.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1-sources.jar!/" />
</SOURCES>
<excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -1,4 +1,4 @@
Copyright 2020-2024 Erik C. Thauvin (erik@thauvin.net)
Copyright 2020-2025 Erik C. Thauvin (erik@thauvin.net)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

View file

@ -1,6 +1,6 @@
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause)
[![Kotlin](https://img.shields.io/badge/kotlin-2.0.20-7f52ff)](https://kotlinlang.org/)
[![bld](https://img.shields.io/badge/2.1.0-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld)
[![Kotlin](https://img.shields.io/badge/kotlin-2.1.10-7f52ff)](https://kotlinlang.org/)
[![bld](https://img.shields.io/badge/2.2.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld)
[![release](https://img.shields.io/github/release/ethauvin/isgd-shorten.svg)](https://github.com/ethauvin/isgd-shorten/releases/latest)
[![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/isgd-shorten.svg?color=blue)](https://central.sonatype.com/artifact/net.thauvin.erik/isgd-shorten)
[![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/isgd-shorten?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/isgd-shorten/)
@ -69,7 +69,7 @@ To use with [bld](https://rife2.com/bld), include the following dependency in yo
repositories = List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY);
scope(compile)
.include("net.thauvin.erik:isgd-shorten:1.0.`");
.include("net.thauvin.erik:isgd-shorten:1.1.0");
```
## Gradle
@ -83,7 +83,7 @@ repositories {
}
dependencies {
implementation("net.thauvin.erik:isgd-shorten:1.0.1")
implementation("net.thauvin.erik:isgd-shorten:1.1.0")
}
```

View file

@ -2,12 +2,12 @@
<library name="bld">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0-sources.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1-sources.jar!/" />
</SOURCES>
<excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -9,7 +9,7 @@
],
"java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [
"${HOME}/.bld/dist/bld-2.1.0.jar",
"${HOME}/.bld/dist/bld-2.2.1.jar",
"lib/**/*.jar"
]
}

Binary file not shown.

View file

@ -1,8 +1,8 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
bld.downloadLocation=
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.8
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.2
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.9
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.4
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories=
bld.version=2.1.0
bld.version=2.2.1

View file

@ -24,7 +24,7 @@ public class ExampleBuild extends BaseProject {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY);
scope(compile)
.include(dependency("net.thauvin.erik:isgd-shorten:1.0.2-SNAPSHOT"));
.include(dependency("net.thauvin.erik:isgd-shorten:1.1.0"));
}
public static void main(String[] args) {

View file

@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("application")
id("com.github.ben-manes.versions") version "0.51.0"
kotlin("jvm") version "2.0.20"
kotlin("jvm") version "2.1.10"
}
repositories {
@ -13,7 +13,7 @@ repositories {
}
dependencies {
implementation("net.thauvin.erik:isgd-shorten:1.0.2-SNAPSHOT")
implementation("net.thauvin.erik:isgd-shorten:1.1.0")
}
java {

Binary file not shown.

View file

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View file

@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@ -206,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_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.

Binary file not shown.

View file

@ -1,10 +1,10 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
bld.downloadLocation=
bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.7
bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.1
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.8
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.2
bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.9
bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.3
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.9
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.4
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories=
bld.version=2.1.0
bld.version=2.2.1

View file

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.thauvin.erik</groupId>
<artifactId>isgd-shorten</artifactId>
<version>1.0.2-SNAPSHOT</version>
<version>1.1.0</version>
<name>isgd-shorten</name>
<description>A simple implementation of the is.gd URL shortening and lookup APIs</description>
<url>https://github.com/ethauvin/isgd-shorten</url>
@ -18,13 +18,13 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>2.0.20</version>
<version>2.1.10</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.thauvin.erik.urlencoder</groupId>
<artifactId>urlencoder-lib-jvm</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
<scope>compile</scope>
</dependency>
</dependencies>

View file

@ -1,7 +1,7 @@
/*
* IsgdShortenBuild.java
*
* Copyright 2020-2024 Erik C. Thauvin (erik@thauvin.net)
* Copyright 2020-2025 Erik C. Thauvin (erik@thauvin.net)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@ -60,7 +60,7 @@ public class IsgdShortenBuild extends Project {
public IsgdShortenBuild() {
pkg = "net.thauvin.erik";
name = "isgd-shorten";
version = version(1, 0, 2, "SNAPSHOT");
version = version(1, 1, 0);
javaRelease = 11;
downloadSources = true;
@ -68,14 +68,14 @@ public class IsgdShortenBuild extends Project {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
final var kotlin = version(2, 0, 20);
final var kotlin = version(2, 1, 10);
scope(compile)
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin))
.include(dependency("net.thauvin.erik.urlencoder", "urlencoder-lib-jvm", version(1, 5, 0)));
.include(dependency("net.thauvin.erik.urlencoder", "urlencoder-lib-jvm", version(1, 6, 0)));
scope(test)
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin))
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0)))
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 1)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 1)))
.include(dependency("com.willowtreeapps.assertk", "assertk-jvm", version(0, 28, 1)));
publishOperation()

View file

@ -1,7 +1,7 @@
/*
* Isgd.kt
*
* Copyright 2020-2024 Erik C. Thauvin (erik@thauvin.net)
* Copyright 2020-2025 Erik C. Thauvin (erik@thauvin.net)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@ -51,6 +51,7 @@ class Isgd private constructor() {
companion object {
private fun callApi(url: String): String {
val connection = URL(url).openConnection() as HttpURLConnection
try {
connection.setRequestProperty(
"User-Agent",
"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0"
@ -62,6 +63,9 @@ class Isgd private constructor() {
connection.responseCode,
connection.errorStream.bufferedReader().use { it.readText() })
}
} finally {
connection.disconnect()
}
}
private fun getHost(isVgd: Boolean = false): String {

View file

@ -1,7 +1,7 @@
/*
* IsgdException.kt
*
* Copyright 2020-2024 Erik C. Thauvin (erik@thauvin.net)
* Copyright 2020-2025 Erik C. Thauvin (erik@thauvin.net)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:

View file

@ -1,7 +1,7 @@
/*
* LookupConfig.kt
*
* Copyright 2020-2024 Erik C. Thauvin (erik@thauvin.net)
* Copyright 2020-2025 Erik C. Thauvin (erik@thauvin.net)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:

View file

@ -1,7 +1,7 @@
/*
* ShortenConfig.kt
*
* Copyright 2020-2024 Erik C. Thauvin (erik@thauvin.net)
* Copyright 2020-2025 Erik C. Thauvin (erik@thauvin.net)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:

View file

@ -1,7 +1,7 @@
/*
* IsgdTest.kt
*
* Copyright 2020-2024 Erik C. Thauvin (erik@thauvin.net)
* Copyright 2020-2025 Erik C. Thauvin (erik@thauvin.net)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: