Compare commits

..

10 commits

Author SHA1 Message Date
b882d68d4c
Removed git-cliff configuration and script 2024-10-20 18:24:53 -07:00
9e60b31f9e
Version 1.6.0 2024-10-19 09:01:36 -07:00
c69d7b7076
Added git-cliff configuration and script 2024-10-18 16:23:04 -07:00
742c221a20
Revert "Set Kotlin's language version to Java 8"
This reverts commit 0b6e55b338.
2024-10-16 12:13:00 -07:00
0b6e55b338
Set Kotlin's language version to Java 8 2024-10-16 11:17:34 -07:00
09b44d53e8
Compile public version with Java 21 2024-10-16 11:15:39 -07:00
df7482c3a0
Version 1.6.0-SNAPSHOT 2024-10-15 13:00:33 -07:00
3e36e389fb
Bumped Gradle to version 8.10.2 2024-10-15 12:43:53 -07:00
d66fdb12e6
Updated dependencies
Bumped Detekt to version 1.23.7
Bumped Kover to version 0.8.3
Bumped Kotlin to version 1.9.24
2024-10-15 12:43:01 -07:00
Ronny Bräunlich
6f33f9c2a9
feat: Java 8 compatibility (#19)
Closes #18

Co-authored-by: Ronny Bräunlich <ronny.braeunlich@cbc.de>
2024-10-15 12:03:54 -07:00
11 changed files with 40 additions and 35 deletions

View file

@ -17,7 +17,7 @@ jobs:
build:
strategy:
matrix:
java-version: [11, 17, 21]
java-version: [8, 11, 17, 21]
os:
- macos-latest
- ubuntu-latest

View file

@ -25,7 +25,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: "11"
java-version: "21"
distribution: "zulu"
- name: Validate Gradle wrapper

View file

@ -60,7 +60,7 @@ repositories {
}
dependencies {
implementation("net.thauvin.erik.urlencoder:urlencoder-lib:1.5.0")
implementation("net.thauvin.erik.urlencoder:urlencoder-lib:1.6.0")
}
```
@ -71,7 +71,7 @@ to the artifact URL.
<dependency>
<groupId>net.thauvin.erik.urlencoder</groupId>
<artifactId>urlencoder-lib-jvm</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
</dependency>
```

View file

@ -4,7 +4,7 @@ plugins {
}
group = "net.thauvin.erik.urlencoder"
version = "1.5.0"
version = "1.6.0"
dependencies {
kover(projects.urlencoderLib)

View file

@ -4,8 +4,9 @@ plugins {
dependencies {
implementation("com.github.ben-manes:gradle-versions-plugin:0.51.0")
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.1")
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.7")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23")
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:0.7.4")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24")
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:0.8.3")
implementation("org.apache.httpcomponents:httpclient:4.5.13")
}

View file

@ -45,12 +45,12 @@ kotlin {
tasks {
withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}
withType<KotlinJvmCompile>().configureEach {
compilerOptions.jvmTarget.set(JvmTarget.JVM_11)
compilerOptions.jvmTarget.set(JvmTarget.JVM_1_8)
}
withType<Test>().configureEach {

View file

@ -16,14 +16,13 @@
package buildsrc.utils
import org.apache.http.client.methods.HttpPost
import org.apache.http.impl.client.HttpClients
import org.apache.http.util.EntityUtils
import org.gradle.api.provider.Provider
import org.gradle.api.tasks.testing.TestDescriptor
import org.gradle.api.tasks.testing.TestListener
import org.gradle.api.tasks.testing.TestResult
import java.net.URI
import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
class Rife2TestListener(
private val testBadgeApiKey: Provider<String>
@ -41,23 +40,23 @@ class Rife2TestListener(
if (apiKey != null) {
println(apiKey)
val response: HttpResponse<String> = HttpClient.newHttpClient()
.send(
HttpRequest.newBuilder()
.uri(
URI(
"https://rife2.com/tests-badge/update/net.thauvin.erik/urlencoder?" +
"apiKey=$apiKey&" +
"passed=$passed&" +
"failed=$failed&" +
"skipped=$skipped"
)
)
.POST(HttpRequest.BodyPublishers.noBody())
.build(), HttpResponse.BodyHandlers.ofString()
)
println("RESPONSE: ${response.statusCode()}")
println(response.body())
val url = "https://rife2.com/tests-badge/update/net.thauvin.erik/urlencoder?" +
"apiKey=$apiKey&" +
"passed=$passed&" +
"failed=$failed&" +
"skipped=$skipped"
val client = HttpClients.createDefault()
val post = HttpPost(url)
val response = client.execute(post)
val entity = response.entity
val statusCode = response.statusLine.statusCode
val responseBody = EntityUtils.toString(entity, "UTF-8")
println("RESPONSE: $statusCode")
println(responseBody)
}
}
}

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.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

7
gradlew vendored
View file

@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@ -84,7 +86,8 @@ 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 "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

2
gradlew.bat vendored
View file

@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################