diff --git a/.circleci/config.yml b/.circleci/config.yml
index 8dabc3f..17b50f1 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.20
+ version: 2.0.0
- run:
name: Download dependencies
command: ./bld download
diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml
index 9ef2fea..3183ee9 100644
--- a/.github/workflows/bld.yml
+++ b/.github/workflows/bld.yml
@@ -2,21 +2,19 @@ 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.20]
+ kotlin-version: [1.9.24, 2.0.0]
steps:
- name: Checkout source repository
@@ -37,10 +35,12 @@ 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
deleted file mode 100644
index 6600cee..0000000
--- a/.idea/bld.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml
index 5c4010c..2fb5ff0 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 5316b95..143dc93 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 d4069f2..2ae5c4b 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 5445790..ce3c795 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 c98e3e6..bde0ec4 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 a418973..7bcb546 100644
--- a/config/detekt/baseline.xml
+++ b/config/detekt/baseline.xml
@@ -5,6 +5,7 @@
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 5c4010c..a2969be 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 99cc0c0..9bd86aa 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 d4069f2..2ae5c4b 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 57ed5ef..b80486a 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 4c33beb..d136e4d 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-2.1.0.jar",
+ "${HOME}/.bld/dist/bld-1.9.1.jar",
"lib/**/*.jar"
]
}
diff --git a/examples/bld/lib/bld/bld-wrapper.jar b/examples/bld/lib/bld/bld-wrapper.jar
index 97dab74..a56ed93 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 28c5833..edf4d9d 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.2
+bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.0-SNAPSHOT
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories=
-bld.version=2.1.0
+bld.version=1.9.1
diff --git a/examples/gradle/build.gradle.kts b/examples/gradle/build.gradle.kts
index 5a15155..b31c97b 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.20"
+ kotlin("jvm") version "2.0.0"
}
defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
diff --git a/examples/gradle/gradle/wrapper/gradle-wrapper.jar b/examples/gradle/gradle/wrapper/gradle-wrapper.jar
index a4b76b9..2c35211 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 0aaefbc..09523c0 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.10.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-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 7917038..93388ee 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 1728ce7..4d7707f 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.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.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.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories=
-bld.version=2.1.0
+bld.version=2.0.0-SNAPSHOT
diff --git a/src/bld/java/net/thauvin/erik/AkismetBuild.java b/src/bld/java/net/thauvin/erik/AkismetBuild.java
index bde820f..dd8922b 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, 20);
+ final var kotlin = version(2, 0, 0);
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, 3)));
+ .include(dependency("org.jetbrains.kotlinx", "kotlinx-serialization-json", version(1, 7, 1)));
scope(provided)
.include(dependency("jakarta.servlet", "jakarta.servlet-api", version(6, 1, 0)));
scope(test)
- .include(dependency("org.mockito", "mockito-core", version(5, 13, 0)))
+ .include(dependency("org.mockito", "mockito-core", version(5, 12, 0)))
.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, 10, 3)))
+ .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 3)))
.include(dependency("com.willowtreeapps.assertk", "assertk-jvm", version(0, 28, 1)));
publishOperation()
@@ -93,25 +93,29 @@ 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 7ffc8c4..7a30996 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"
}