diff --git a/.circleci/config.yml b/.circleci/config.yml
index 17b50f1..8dabc3f 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -21,7 +21,7 @@ commands:
- sdkman/setup-sdkman
- sdkman/sdkman-install:
candidate: kotlin
- version: 2.0.0
+ version: 2.0.20
- run:
name: Download dependencies
command: ./bld download
diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml
index 3183ee9..9ef2fea 100644
--- a/.github/workflows/bld.yml
+++ b/.github/workflows/bld.yml
@@ -2,19 +2,21 @@ name: bld-ci
on: [push, pull_request, workflow_dispatch]
+env:
+ AKISMET_API_KEY: ${{ secrets.AKISMET_API_KEY }}
+ AKISMET_BLOG: ${{ secrets.AKISMET_BLOG }}
+ COVERAGE_JDK: "21"
+ COVERAGE_KOTLIN: "2.0.0"
+ KOTLIN_HOME: /usr/share/kotlinc
+
jobs:
build-bld-project:
runs-on: ubuntu-latest
- env:
- COVERAGE_JDK: "21"
- COVERAGE_KOTLIN: "2.0.0"
- KOTLIN_HOME: /usr/share/kotlinc
-
strategy:
matrix:
java-version: [17, 21, 22]
- kotlin-version: [1.9.24, 2.0.0]
+ kotlin-version: [1.9.24, 2.0.20]
steps:
- name: Checkout source repository
@@ -35,12 +37,10 @@ jobs:
run: ./bld compile
- name: Run tests
- env:
- AKISMET_BLOG: ${{ secrets.AKISMET_BLOG }}
- AKISMET_API_KEY: ${{ secrets.AKISMET_API_KEY }}
run: ./bld jacoco
- name: Remove pom.xml
+ if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN
run: rm -rf pom.xml
- name: SonarCloud Scan
diff --git a/.idea/bld.xml b/.idea/bld.xml
new file mode 100644
index 0000000..6600cee
--- /dev/null
+++ b/.idea/bld.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml
index 2fb5ff0..5c4010c 100644
--- a/.idea/libraries/bld.xml
+++ b/.idea/libraries/bld.xml
@@ -2,12 +2,12 @@
-
+
-
+
diff --git a/.idea/libraries/compile.xml b/.idea/libraries/compile.xml
index 143dc93..5316b95 100644
--- a/.idea/libraries/compile.xml
+++ b/.idea/libraries/compile.xml
@@ -9,9 +9,9 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/runtime.xml b/.idea/libraries/runtime.xml
index 2ae5c4b..d4069f2 100644
--- a/.idea/libraries/runtime.xml
+++ b/.idea/libraries/runtime.xml
@@ -8,7 +8,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/.idea/libraries/test.xml b/.idea/libraries/test.xml
index ce3c795..5445790 100644
--- a/.idea/libraries/test.xml
+++ b/.idea/libraries/test.xml
@@ -11,9 +11,9 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index bde0ec4..c98e3e6 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
[](https://opensource.org/licenses/BSD-3-Clause)
-[](https://kotlinlang.org/)
-[](https://rife2.com/bld)
+[](https://kotlinlang.org/)
+[](https://rife2.com/bld)
[](https://github.com/ethauvin/akismet-kotlin/releases/latest)
[](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/akismet-kotlin/)
[](https://central.sonatype.com/artifact/net.thauvin.erik/akismet-kotlin)
diff --git a/config/detekt/baseline.xml b/config/detekt/baseline.xml
index 7bcb546..a418973 100644
--- a/config/detekt/baseline.xml
+++ b/config/detekt/baseline.xml
@@ -5,7 +5,6 @@
CyclomaticComplexMethod:Akismet.kt$Akismet$private fun buildFormBody(comment: AkismetComment): FormBody
CyclomaticComplexMethod:AkismetComment.kt$AkismetComment$@Suppress("DuplicatedCode") override fun equals(other: Any?): Boolean
LongParameterList:AkismetServlet.kt$AkismetServlet$( id: String, name: String?, email: String?, date: String?, comment: String?, json: String, isSpam: Boolean )
- LongParameterList:CommentConfig.kt$CommentConfig$( var userIp: String, var userAgent: String, var referrer: String = "", var permalink: String = "", var type: CommentType = CommentType.NONE, var author: String = "", var authorEmail: String = "", var authorUrl: String = "", var content: String = "", var dateGmt: String = "", var postModifiedGmt: String = "", var blogLang: String = "", var blogCharset: String = "", var userRole: String = "", var isTest: Boolean = false, var recheckReason: String = "", var serverEnv: Map<String, String> = emptyMap() )
MagicNumber:Akismet.kt$Akismet$12
MagicNumber:Akismet.kt$Akismet$8
NestedBlockDepth:Akismet.kt$Akismet$@JvmOverloads fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean
diff --git a/examples/bld/.idea/libraries/bld.xml b/examples/bld/.idea/libraries/bld.xml
index a2969be..5c4010c 100644
--- a/examples/bld/.idea/libraries/bld.xml
+++ b/examples/bld/.idea/libraries/bld.xml
@@ -2,12 +2,12 @@
-
+
-
+
diff --git a/examples/bld/.idea/libraries/compile.xml b/examples/bld/.idea/libraries/compile.xml
index 9bd86aa..99cc0c0 100644
--- a/examples/bld/.idea/libraries/compile.xml
+++ b/examples/bld/.idea/libraries/compile.xml
@@ -7,7 +7,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/examples/bld/.idea/libraries/runtime.xml b/examples/bld/.idea/libraries/runtime.xml
index 2ae5c4b..d4069f2 100644
--- a/examples/bld/.idea/libraries/runtime.xml
+++ b/examples/bld/.idea/libraries/runtime.xml
@@ -8,7 +8,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/examples/bld/.idea/libraries/test.xml b/examples/bld/.idea/libraries/test.xml
index b80486a..57ed5ef 100644
--- a/examples/bld/.idea/libraries/test.xml
+++ b/examples/bld/.idea/libraries/test.xml
@@ -8,7 +8,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/examples/bld/.vscode/settings.json b/examples/bld/.vscode/settings.json
index d136e4d..4c33beb 100644
--- a/examples/bld/.vscode/settings.json
+++ b/examples/bld/.vscode/settings.json
@@ -9,7 +9,7 @@
],
"java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [
- "${HOME}/.bld/dist/bld-1.9.1.jar",
+ "${HOME}/.bld/dist/bld-2.1.0.jar",
"lib/**/*.jar"
]
}
diff --git a/examples/bld/lib/bld/bld-wrapper.jar b/examples/bld/lib/bld/bld-wrapper.jar
index a56ed93..97dab74 100644
Binary files a/examples/bld/lib/bld/bld-wrapper.jar and b/examples/bld/lib/bld/bld-wrapper.jar differ
diff --git a/examples/bld/lib/bld/bld-wrapper.properties b/examples/bld/lib/bld/bld-wrapper.properties
index edf4d9d..28c5833 100644
--- a/examples/bld/lib/bld/bld-wrapper.properties
+++ b/examples/bld/lib/bld/bld-wrapper.properties
@@ -1,7 +1,7 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
bld.downloadLocation=
-bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.0-SNAPSHOT
+bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.2
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories=
-bld.version=1.9.1
+bld.version=2.1.0
diff --git a/examples/gradle/build.gradle.kts b/examples/gradle/build.gradle.kts
index b31c97b..5a15155 100644
--- a/examples/gradle/build.gradle.kts
+++ b/examples/gradle/build.gradle.kts
@@ -1,7 +1,7 @@
plugins {
id("application")
id("com.github.ben-manes.versions") version "0.51.0"
- kotlin("jvm") version "2.0.0"
+ kotlin("jvm") version "2.0.20"
}
defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
diff --git a/examples/gradle/gradle/wrapper/gradle-wrapper.jar b/examples/gradle/gradle/wrapper/gradle-wrapper.jar
index 2c35211..a4b76b9 100644
Binary files a/examples/gradle/gradle/wrapper/gradle-wrapper.jar and b/examples/gradle/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/examples/gradle/gradle/wrapper/gradle-wrapper.properties b/examples/gradle/gradle/wrapper/gradle-wrapper.properties
index 09523c0..0aaefbc 100644
--- a/examples/gradle/gradle/wrapper/gradle-wrapper.properties
+++ b/examples/gradle/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar
index 93388ee..7917038 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 4d7707f..1728ce7 100644
--- a/lib/bld/bld-wrapper.properties
+++ b/lib/bld/bld-wrapper.properties
@@ -1,11 +1,11 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
bld.downloadLocation=
-bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.4
-bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.0-SNAPSHOT
-bld.extension-gv=com.uwyn.rife2:bld-generated-version:0.9.8-SNAPSHOT
-bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.6
-bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.0-SNAPSHOT
+bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.7
+bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.1
+bld.extension-gv=com.uwyn.rife2:bld-generated-version:0.9.9
+bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.8
+bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.2
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories=
-bld.version=2.0.0-SNAPSHOT
+bld.version=2.1.0
diff --git a/src/bld/java/net/thauvin/erik/AkismetBuild.java b/src/bld/java/net/thauvin/erik/AkismetBuild.java
index dd8922b..bde820f 100644
--- a/src/bld/java/net/thauvin/erik/AkismetBuild.java
+++ b/src/bld/java/net/thauvin/erik/AkismetBuild.java
@@ -71,21 +71,21 @@ public class AkismetBuild extends Project {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
var okHttp = version(4, 12, 0);
- final var kotlin = version(2, 0, 0);
+ final var kotlin = version(2, 0, 20);
scope(compile)
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin))
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk7", kotlin))
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk8", kotlin))
.include(dependency("com.squareup.okhttp3", "okhttp", okHttp))
.include(dependency("com.squareup.okhttp3", "logging-interceptor", okHttp))
- .include(dependency("org.jetbrains.kotlinx", "kotlinx-serialization-json", version(1, 7, 1)));
+ .include(dependency("org.jetbrains.kotlinx", "kotlinx-serialization-json", version(1, 7, 3)));
scope(provided)
.include(dependency("jakarta.servlet", "jakarta.servlet-api", version(6, 1, 0)));
scope(test)
- .include(dependency("org.mockito", "mockito-core", version(5, 12, 0)))
+ .include(dependency("org.mockito", "mockito-core", version(5, 13, 0)))
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin))
- .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 3)))
- .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 3)))
+ .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("com.willowtreeapps.assertk", "assertk-jvm", version(0, 28, 1)));
publishOperation()
@@ -93,29 +93,25 @@ public class AkismetBuild extends Project {
.withCredentials(property("sonatype.user"), property("sonatype.password"))
: repository(SONATYPE_RELEASES_LEGACY.location())
.withCredentials(property("sonatype.user"), property("sonatype.password")))
+ .repository(repository("github"))
.info()
.groupId(pkg)
.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/")
+ .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))
+ .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"));
diff --git a/src/main/kotlin/net/thauvin/erik/akismet/GeneratedVersion.kt b/src/main/kotlin/net/thauvin/erik/akismet/GeneratedVersion.kt
index 7a30996..7ffc8c4 100644
--- a/src/main/kotlin/net/thauvin/erik/akismet/GeneratedVersion.kt
+++ b/src/main/kotlin/net/thauvin/erik/akismet/GeneratedVersion.kt
@@ -1,14 +1,14 @@
-/*
-* This file is automatically generated.
-* Do not modify! -- ALL CHANGES WILL BE ERASED!
-*/
+/**
+ * This file is automatically generated.
+ * Do not modify! -- ALL CHANGES WILL BE ERASED!
+ */
package net.thauvin.erik.akismet
/**
-* Provides semantic version information.
-*/
-internal object GeneratedVersion {
+ * Provides semantic version information.
+ */
+ internal object GeneratedVersion {
const val PROJECT = "Akismet Kotlin"
const val VERSION = "1.1.0-SNAPSHOT"
}