diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index cc397af..08a73b4 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: java-version: [17, 21, 23] - kotlin-version: [1.9.24, 2.1.0] + kotlin-version: [1.9.25, 2.1.10] steps: - name: Checkout source repository diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index 5c4010c..153a060 100644 --- a/.idea/libraries/bld.xml +++ b/.idea/libraries/bld.xml @@ -2,12 +2,12 @@ - + - + diff --git a/LICENSE.txt b/LICENSE.txt index 4331a4d..82ecd17 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2022-2023 Erik C. Thauvin (erik@thauvin.net) +Copyright 2022-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: diff --git a/README.md b/README.md index b289e5c..a4e6631 100644 --- a/README.md +++ b/README.md @@ -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.1.0-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/jokeapi.svg)](https://github.com/ethauvin/jokeapi/releases/latest) [![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/jokeapi?color=blue)](https://central.sonatype.com/artifact/net.thauvin.erik/jokeapi) [![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/jokeapi?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/jokeapi/) diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar index be0620d..1eb86cf 100644 Binary files a/lib/bld/bld-wrapper.jar and b/lib/bld/bld-wrapper.jar differ diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 04271d1..154abb0 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -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.2 -bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.8 -bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.3 +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 diff --git a/pom.xml b/pom.xml index 2f8858d..2a9d9e6 100644 --- a/pom.xml +++ b/pom.xml @@ -18,13 +18,13 @@ org.jetbrains.kotlin kotlin-stdlib - 2.1.0 + 2.1.10 compile org.json json - 20240303 + 20250107 compile diff --git a/src/bld/java/net/thauvin/erik/JokeApiBuild.java b/src/bld/java/net/thauvin/erik/JokeApiBuild.java index 979bb2e..be69f63 100644 --- a/src/bld/java/net/thauvin/erik/JokeApiBuild.java +++ b/src/bld/java/net/thauvin/erik/JokeApiBuild.java @@ -1,7 +1,7 @@ /* * JokeApiBuild.java * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: @@ -67,15 +67,15 @@ public class JokeApiBuild extends Project { autoDownloadPurge = true; repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL); - final var kotlin = version(2, 1, 0); + final var kotlin = version(2, 1, 10); scope(compile) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)) - .include(dependency("org.json", "json", "20240303")) + .include(dependency("org.json", "json", "20250107")) .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, 4))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 4))) + .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() @@ -167,6 +167,12 @@ public class JokeApiBuild extends Project { pomRoot(); } + @Override + public void publishLocal() throws Exception { + super.publishLocal(); + pomRoot(); + } + @BuildCommand(value = "pom-root", summary = "Generates the POM file in the root directory") public void pomRoot() throws FileUtilsErrorException { PomBuilder.generateInto(publishOperation().fromProject(this).info(), dependencies(), diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/JokeApi.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/JokeApi.kt index c33c75b..474aa27 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/JokeApi.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/JokeApi.kt @@ -1,7 +1,7 @@ /* * JokeApi.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/JokeConfig.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/JokeConfig.kt index d8e6ad5..a4d4901 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/JokeConfig.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/JokeConfig.kt @@ -1,7 +1,7 @@ /* * JokeConfig.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/JokeUtil.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/JokeUtil.kt index a6457bb..460211c 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/JokeUtil.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/JokeUtil.kt @@ -1,7 +1,7 @@ /* * JokeUtil.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/exceptions/HttpErrorException.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/exceptions/HttpErrorException.kt index bcf0173..f2e8529 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/exceptions/HttpErrorException.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/exceptions/HttpErrorException.kt @@ -1,7 +1,7 @@ /* * HttpErrorException.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/exceptions/JokeException.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/exceptions/JokeException.kt index 3854116..ac77344 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/exceptions/JokeException.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/exceptions/JokeException.kt @@ -1,7 +1,7 @@ /* * JokeException.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Category.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Category.kt index 55021ad..cfb008e 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Category.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Category.kt @@ -1,7 +1,7 @@ /* * Category.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Flag.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Flag.kt index 2f3b9d4..be2e21f 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Flag.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Flag.kt @@ -1,7 +1,7 @@ /* * Flag.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Format.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Format.kt index 7a0e74a..1beb9d3 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Format.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Format.kt @@ -1,7 +1,7 @@ /* * Format.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/models/IdRange.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/models/IdRange.kt index a92fdf1..73d45ec 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/models/IdRange.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/models/IdRange.kt @@ -1,7 +1,7 @@ /* * IdRange.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Joke.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Joke.kt index 413e133..c2124ae 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Joke.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Joke.kt @@ -1,7 +1,7 @@ /* * Joke.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/models/JokeResponse.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/models/JokeResponse.kt index 11d4c56..d34f2c3 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/models/JokeResponse.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/models/JokeResponse.kt @@ -1,7 +1,7 @@ /* * JokeResponse.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Language.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Language.kt index ddcb462..3ee166e 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Language.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Language.kt @@ -1,7 +1,7 @@ /* * Language.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Parameter.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Parameter.kt index 812ca33..8962b2a 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Parameter.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Parameter.kt @@ -1,7 +1,7 @@ /* * Parameter.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Type.kt b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Type.kt index e19ee73..4fd80fe 100644 --- a/src/main/kotlin/net/thauvin/erik/jokeapi/models/Type.kt +++ b/src/main/kotlin/net/thauvin/erik/jokeapi/models/Type.kt @@ -1,7 +1,7 @@ /* * Type.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/test/kotlin/net/thauvin/erik/jokeapi/ApiCallTest.kt b/src/test/kotlin/net/thauvin/erik/jokeapi/ApiCallTest.kt index 492d829..6153825 100644 --- a/src/test/kotlin/net/thauvin/erik/jokeapi/ApiCallTest.kt +++ b/src/test/kotlin/net/thauvin/erik/jokeapi/ApiCallTest.kt @@ -1,7 +1,7 @@ /* * ApiCallTest.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/test/kotlin/net/thauvin/erik/jokeapi/BeforeAllTests.kt b/src/test/kotlin/net/thauvin/erik/jokeapi/BeforeAllTests.kt index b9d59f5..50ce4b2 100644 --- a/src/test/kotlin/net/thauvin/erik/jokeapi/BeforeAllTests.kt +++ b/src/test/kotlin/net/thauvin/erik/jokeapi/BeforeAllTests.kt @@ -1,7 +1,7 @@ /* * BeforeAllTests.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/test/kotlin/net/thauvin/erik/jokeapi/ExceptionsTest.kt b/src/test/kotlin/net/thauvin/erik/jokeapi/ExceptionsTest.kt index d441189..eb6837a 100644 --- a/src/test/kotlin/net/thauvin/erik/jokeapi/ExceptionsTest.kt +++ b/src/test/kotlin/net/thauvin/erik/jokeapi/ExceptionsTest.kt @@ -1,7 +1,7 @@ /* * ExceptionsTest.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/test/kotlin/net/thauvin/erik/jokeapi/GetJokeTest.kt b/src/test/kotlin/net/thauvin/erik/jokeapi/GetJokeTest.kt index 5c86c08..e5a7d39 100644 --- a/src/test/kotlin/net/thauvin/erik/jokeapi/GetJokeTest.kt +++ b/src/test/kotlin/net/thauvin/erik/jokeapi/GetJokeTest.kt @@ -1,7 +1,7 @@ /* * GetJokeTest.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: @@ -70,15 +70,12 @@ internal class GetJokeTest { @Test fun `Get Joke with ID`() { - val id = 172 + val id = 201 val joke = joke(idRange = IdRange(id)) logger.fine(joke.toString()) assertThat(joke, "joke($id)").all { - prop(Joke::flags).all { - contains(Flag.EXPLICIT) - contains(Flag.NSFW) - } - prop(Joke::id).isEqualTo(172) + prop(Joke::flags).contains(Flag.RELIGIOUS); + prop(Joke::id).isEqualTo(id) prop(Joke::category).isEqualTo(Category.PUN) } } @@ -137,12 +134,10 @@ internal class GetJokeTest { @Test fun `Get Joke with Split Newline`() { - val joke = joke( - categories = setOf(Category.DARK), type = Type.SINGLE, idRange = IdRange(178), splitNewLine = true - ) + val joke = joke(type = Type.SINGLE, idRange = IdRange(18), splitNewLine = true) logger.fine(joke.toString()) assertThat(joke::joke, "joke(splitNewLine=true)").all { - size().isEqualTo(2) + size().isGreaterThanOrEqualTo(2) each { containsNone("\n") } @@ -177,13 +172,12 @@ internal class GetJokeTest { @Test fun `Get Joke using Search`() { - val id = 265 - val search = "his wife" + val search = "UDP joke" val joke = - joke(contains = search, categories = setOf(Category.PROGRAMMING), idRange = IdRange(id), safe = true) + joke(contains = search, categories = setOf(Category.PROGRAMMING), safe = true) logger.fine(joke.toString()) assertThat(joke, "joke($search)").all { - prop(Joke::id).isEqualTo(id) + prop(Joke::id).isEqualTo(0) prop(Joke::joke).any { it.contains(search) } diff --git a/src/test/kotlin/net/thauvin/erik/jokeapi/GetJokesTest.kt b/src/test/kotlin/net/thauvin/erik/jokeapi/GetJokesTest.kt index dffb187..ea49211 100644 --- a/src/test/kotlin/net/thauvin/erik/jokeapi/GetJokesTest.kt +++ b/src/test/kotlin/net/thauvin/erik/jokeapi/GetJokesTest.kt @@ -1,7 +1,7 @@ /* * GetJokesTest.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/test/kotlin/net/thauvin/erik/jokeapi/GetRawJokesTest.kt b/src/test/kotlin/net/thauvin/erik/jokeapi/GetRawJokesTest.kt index 3466611..aa85337 100644 --- a/src/test/kotlin/net/thauvin/erik/jokeapi/GetRawJokesTest.kt +++ b/src/test/kotlin/net/thauvin/erik/jokeapi/GetRawJokesTest.kt @@ -1,7 +1,7 @@ /* * GetRawJokesTest.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/test/kotlin/net/thauvin/erik/jokeapi/JokeConfigTest.kt b/src/test/kotlin/net/thauvin/erik/jokeapi/JokeConfigTest.kt index a311a71..a4d4e0c 100644 --- a/src/test/kotlin/net/thauvin/erik/jokeapi/JokeConfigTest.kt +++ b/src/test/kotlin/net/thauvin/erik/jokeapi/JokeConfigTest.kt @@ -1,7 +1,7 @@ /* * JokeConfigTest.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: diff --git a/src/test/kotlin/net/thauvin/erik/jokeapi/JokeUtilTest.kt b/src/test/kotlin/net/thauvin/erik/jokeapi/JokeUtilTest.kt index 7a05c27..d50b97a 100644 --- a/src/test/kotlin/net/thauvin/erik/jokeapi/JokeUtilTest.kt +++ b/src/test/kotlin/net/thauvin/erik/jokeapi/JokeUtilTest.kt @@ -1,7 +1,7 @@ /* * JokeUtilTest.kt * - * Copyright 2022-2024 Erik C. Thauvin (erik@thauvin.net) + * Copyright 2022-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: