diff --git a/README.md b/README.md index dcf5937..70ff51b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![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-1.9.20-7f52ff)](https://kotlinlang.org/) +[![Kotlin](https://img.shields.io/badge/kotlin-1.9.21-7f52ff)](https://kotlinlang.org/) [![Release](https://img.shields.io/github/release/ethauvin/akismet-kotlin.svg)](https://github.com/ethauvin/akismet-kotlin/releases/latest) [![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/akismet-kotlin?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/akismet-kotlin/) [![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/akismet-kotlin.svg?color=blue)](https://central.sonatype.com/artifact/net.thauvin.erik/akismet-kotlin) diff --git a/examples/bld/README.md b/examples/bld/README.md index 4cec4ce..52ef7f3 100644 --- a/examples/bld/README.md +++ b/examples/bld/README.md @@ -1,7 +1,7 @@ ## Kotlin Example To compile & run the Kotlin example: -```text +```console ./bld compile ./bld run --args=API_KEY @@ -11,7 +11,7 @@ To compile & run the Kotlin example: cd To compile & run the Java example: -```text +```console ./bld compile ./bld run-java --args=API_KEY diff --git a/examples/bld/src/bld/java/com/example/ExampleBuild.java b/examples/bld/src/bld/java/com/example/ExampleBuild.java index 33f0638..7aac507 100644 --- a/examples/bld/src/bld/java/com/example/ExampleBuild.java +++ b/examples/bld/src/bld/java/com/example/ExampleBuild.java @@ -1,12 +1,10 @@ package com.example; -import rife.bld.BaseProject; import rife.bld.BuildCommand; import rife.bld.extension.CompileKotlinOperation; -import rife.bld.extension.CompileKotlinOptions; import rife.bld.operations.RunOperation; +import rife.bld.BaseProject; -import java.util.List; import static rife.bld.dependencies.Repository.*; import static rife.bld.dependencies.Scope.compile; @@ -37,11 +35,6 @@ public class ExampleBuild extends BaseProject { public void compile() throws Exception { new CompileKotlinOperation() .fromProject(this) - .compileOptions( - new CompileKotlinOptions() - .jdkRelease(javaRelease) - .verbose(true) - ) .execute(); // Also compile the Java source code diff --git a/examples/gradle/.idea/.name b/examples/gradle/.idea/.name index ac5e64e..bdb1d33 100644 --- a/examples/gradle/.idea/.name +++ b/examples/gradle/.idea/.name @@ -1 +1 @@ -akismet-examples-gradle \ No newline at end of file +akismet-examples \ No newline at end of file diff --git a/examples/gradle/README.md b/examples/gradle/README.md index 445ae5a..6258631 100644 --- a/examples/gradle/README.md +++ b/examples/gradle/README.md @@ -1,7 +1,7 @@ ## Kotlin Example To compile & run the Kotlin example: -```text +```console ./gradlew run --args=API_KEY ``` @@ -9,6 +9,6 @@ To compile & run the Kotlin example: To compile & run the Java example: -```text +```console ./gradlew runJava --args=API_KEY ``` diff --git a/examples/gradle/build.gradle.kts b/examples/gradle/build.gradle.kts index 55b665a..2aa991a 100644 --- a/examples/gradle/build.gradle.kts +++ b/examples/gradle/build.gradle.kts @@ -2,8 +2,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("application") - id("com.github.ben-manes.versions") version "0.49.0" - kotlin("jvm") version "1.9.20" + id("com.github.ben-manes.versions") version "0.50.0" + kotlin("jvm") version "1.9.21" } defaultTasks(ApplicationPlugin.TASK_RUN_NAME) diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 37e3035..74dfad6 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -2,7 +2,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.1 bld.extensions-kotlin=com.uwyn.rife2:bld-kotlin:0.9.0-SNAPSHOT -bld.extensions=com.uwyn.rife2:bld-generated-version:0.9.3-SNAPSHOT +bld.extensions=com.uwyn.rife2:bld-generated-version:0.9.3 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.downloadLocation= bld.sourceDirectories= diff --git a/pom.xml b/pom.xml index fecf267..5f65e61 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ org.jetbrains.kotlin kotlin-stdlib - 1.9.20 + 1.9.21 compile @@ -42,7 +42,7 @@ org.jetbrains.kotlinx kotlinx-serialization-json-jvm - 1.6.0 + 1.6.1 compile @@ -55,7 +55,7 @@ - scm:git:https://github.com/ethauvin/akismet-kotlin + scm:git:https://github.com/ethauvin/akismet-kotlin.git scm:git:git@github.com:ethauvin/akismet-kotlin.git https://github.com/ethauvin/akismet-kotlin diff --git a/src/bld/java/net/thauvin/erik/AkismetBuild.java b/src/bld/java/net/thauvin/erik/AkismetBuild.java index c8fa65f..f32d1e8 100644 --- a/src/bld/java/net/thauvin/erik/AkismetBuild.java +++ b/src/bld/java/net/thauvin/erik/AkismetBuild.java @@ -65,16 +65,16 @@ public class AkismetBuild extends Project { var okHttp = version(4, 12, 0); scope(compile) - .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", version(1, 9, 20))) + .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", version(1, 9, 21))) .include(dependency("com.squareup.okhttp3", "okhttp", okHttp)) .include(dependency("com.squareup.okhttp3", "logging-interceptor", okHttp)) .include(dependency("jakarta.servlet", "jakarta.servlet-api", version(6, 0, 0))) - .include(dependency("org.jetbrains.kotlinx", "kotlinx-serialization-json-jvm", version(1, 6, 0))); + .include(dependency("org.jetbrains.kotlinx", "kotlinx-serialization-json-jvm", version(1, 6, 1))); scope(provided) - .include(dependency("org.jetbrains.kotlin:kotlin-serialization-compiler-plugin:1.9.20")); + .include(dependency("org.jetbrains.kotlin", "kotlin-serialization-compiler-plugin", version(1, 9, 21))); scope(test) - .include(dependency("org.mockito", "mockito-core", version(5, 6, 0))) - .include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", version(1, 9, 20))) + .include(dependency("org.mockito", "mockito-core", version(5, 7, 0))) + .include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", version(1, 9, 21))) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1))) .include(dependency("com.willowtreeapps.assertk", "assertk-jvm", version(0, 27, 0))); @@ -89,18 +89,24 @@ public class AkismetBuild extends Project { .artifactId(name) .description("A client library for accessing the Automattic Kismet (Akismet) spam comments filtering service.") .url("https://github.com/ethauvin/" + name) - .developer(new PublishDeveloper() - .id("ethauvin") - .name("Erik C. Thauvin") - .email("erik@thauvin.net") - .url("https://erik.thauvin.net/")) - .license(new PublishLicense() - .name("BSD 3-Clause") - .url("https://opensource.org/licenses/BSD-3-Clause")) - .scm(new PublishScm() - .connection("scm:git:https://github.com/ethauvin/" + name) - .developerConnection("scm:git:git@github.com:ethauvin/" + name + ".git") - .url("https://github.com/ethauvin/" + name)) + .developer( + new PublishDeveloper() + .id("ethauvin") + .name("Erik C. Thauvin") + .email("erik@thauvin.net") + .url("https://erik.thauvin.net/") + ) + .license( + + new PublishLicense() + .name("BSD 3-Clause") + .url("https://opensource.org/licenses/BSD-3-Clause")) + .scm( + + new PublishScm() + .connection("scm:git:https://github.com/ethauvin/" + name + ".git") + .developerConnection("scm:git:git@github.com:ethauvin/" + name + ".git") + .url("https://github.com/ethauvin/" + name)) .signKey(property("sign.key")) .signPassphrase(property("sign.passphrase")); @@ -118,11 +124,6 @@ public class AkismetBuild extends Project { new CompileKotlinOperation() .fromProject(this) .plugins(libCompileDirectory(), CompileKotlinPlugin.KOTLIN_SERIALIZATION) - .compileOptions( - new CompileKotlinOptions() - .jdkRelease(javaRelease) - .verbose(true) - ) .execute(); } diff --git a/src/test/java/net/thauvin/erik/AkismetTest.java b/src/test/java/net/thauvin/erik/AkismetTest.java deleted file mode 100644 index ea4fecc..0000000 --- a/src/test/java/net/thauvin/erik/AkismetTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * AkismetTest.java - * - * Copyright 2019-2023 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: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of this project nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package net.thauvin.erik; - -public class AkismetTest { - public static void main(String[] args) { - new AkismetTest().verifyHello(); - } - - void verifyHello() { - if (!"Hello World!".equals(new AkismetLib().getMessage())) { - throw new AssertionError(); - } else { - System.out.println("Succeeded"); - } - } -}