diff --git a/.circleci/config.yml b/.circleci/config.yml
index 23a719e..e6c4f38 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -30,19 +30,19 @@ defaults_gradle: &defaults_gradle
path: build/reports/
jobs:
- build_gradle_jdk15:
+ build_gradle_jdk18:
<<: *defaults
docker:
- - image: cimg/openjdk:15.0
+ - image: cimg/openjdk:18.0
<<: *defaults_gradle
- build_gradle_jdk8:
+ build_gradle_jdk11:
<<: *defaults
docker:
- - image: cimg/openjdk:8.0
+ - image: cimg/openjdk:11.0
<<: *defaults_gradle
@@ -50,6 +50,6 @@ workflows:
version: 2
gradle:
jobs:
- - build_gradle_jdk8
- - build_gradle_jdk15
+ - build_gradle_jdk11
+ - build_gradle_jdk18
diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml
index 523faab..c39c63c 100644
--- a/.github/workflows/gradle.yml
+++ b/.github/workflows/gradle.yml
@@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
- java-version: [ 1.8, 11, 15 ]
+ java-version: [ 11, 18 ]
steps:
- uses: actions/checkout@v2
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 61a9130..fb7f4a8 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index 4290988..dd5077a 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -41,5 +41,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 0000000..e1eea1d
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 5b5589f..64cb2dd 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
deleted file mode 100644
index 797acea..0000000
--- a/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/README.md b/README.md
index ae47bb8..cbd824d 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
[](https://opensource.org/licenses/BSD-3-Clause) [](https://github.com/ethauvin/akismet-kotlin/releases/latest) [](https://search.maven.org/search?q=g:%22net.thauvin.erik%22%20AND%20a:%22akismet-kotlin%22)
-[](https://snyk.io/test/github/ethauvin/akismet-kotlin?targetFile=pom.xml) [](https://sonarcloud.io/dashboard?id=ethauvin_akismet-kotlin) [](https://github.com/ethauvin/akismet-kotlin/actions/workflows/gradle.yml) [](https://circleci.com/gh/ethauvin/akismet-kotlin/tree/master)
+[](https://sonarcloud.io/dashboard?id=ethauvin_akismet-kotlin) [](https://github.com/ethauvin/akismet-kotlin/actions/workflows/gradle.yml) [](https://circleci.com/gh/ethauvin/akismet-kotlin/tree/master)
# [Akismet](https://www.akismet.com) for Kotlin/Java
@@ -61,6 +61,10 @@ if (isSpam) {
To use with [Gradle](https://gradle.org/), include the following dependency in your [build](https://github.com/ethauvin/akismet-kotlin/blob/master/examples/build.gradle.kts) file:
```gradle
+repositories {
+ mavenCentral()
+}
+
dependencies {
implementation("net.thauvin.erik:akismet-kotlin:0.9.3")
}
diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml
index 7d98402..a9514a0 100644
--- a/bitbucket-pipelines.yml
+++ b/bitbucket-pipelines.yml
@@ -1,4 +1,4 @@
-image: openjdk:8
+image: maven:3-openjdk-18
pipelines:
default:
diff --git a/build.gradle.kts b/build.gradle.kts
index b1a4d6c..def52af 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -6,18 +6,18 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id("com.github.ben-manes.versions") version "0.42.0"
- id("io.gitlab.arturbosch.detekt") version "1.20.0"
+ id("io.gitlab.arturbosch.detekt") version "1.21.0"
id("java-library")
id("java")
id("maven-publish")
id("net.thauvin.erik.gradle.semver") version "1.0.4"
- id("org.jetbrains.dokka") version "1.6.21"
- id("org.jetbrains.kotlinx.kover") version "0.5.0"
- id("org.sonarqube") version "3.3"
+ id("org.jetbrains.dokka") version "1.7.10"
+ id("org.jetbrains.kotlinx.kover") version "0.6.0"
+ id("org.sonarqube") version "3.4.0.2513"
id("signing")
- kotlin("jvm") version "1.6.21"
- kotlin("kapt") version "1.6.21"
- kotlin("plugin.serialization") version "1.6.21"
+ kotlin("jvm") version "1.7.20"
+ kotlin("kapt") version "1.7.20"
+ kotlin("plugin.serialization") version "1.7.20"
}
group = "net.thauvin.erik"
@@ -33,7 +33,7 @@ var semverProcessor = "net.thauvin.erik:semver:1.2.0"
val publicationName = "mavenJava"
object Versions {
- const val OKHTTP = "4.9.3"
+ const val OKHTTP = "4.10.0"
}
fun isNonStable(version: String): Boolean {
@@ -54,15 +54,17 @@ dependencies {
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
- implementation("javax.servlet:javax.servlet-api:4.0.1")
+// implementation("javax.servlet:javax.servlet-api:4.0.1")
+ implementation("jakarta.servlet:jakarta.servlet-api:6.0.0")
+
implementation("com.squareup.okhttp3:okhttp:${Versions.OKHTTP}")
implementation("com.squareup.okhttp3:logging-interceptor:${Versions.OKHTTP}")
- implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
+ implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0")
- testImplementation("org.mockito:mockito-core:4.5.1")
- testImplementation("org.testng:testng:7.5")
+ testImplementation("org.mockito:mockito-core:4.8.0")
+ testImplementation("org.testng:testng:7.6.1")
}
kapt {
@@ -77,8 +79,8 @@ detekt {
}
java {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
+ sourceCompatibility = JavaVersion.VERSION_11
+ targetCompatibility = JavaVersion.VERSION_11
withSourcesJar()
}
@@ -88,7 +90,7 @@ sonarqube {
property("sonar.organization", "ethauvin-github")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.sourceEncoding", "UTF-8")
- property("sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/kover/report.xml")
+ property("sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/kover/xml/report.xml")
}
}
@@ -139,7 +141,6 @@ tasks {
dokkaSourceSets {
configureEach {
- jdkVersion.set(8)
includes.from("config/dokka/packages.md")
sourceLink {
localDirectory.set(file("src/main/kotlin/"))
@@ -147,8 +148,7 @@ tasks {
remoteLineSuffix.set("#L")
}
externalDocumentationLink {
- url.set(URL("https://javaee.github.io/javaee-spec/javadocs/"))
- packageListUrl.set(URL("https://javaee.github.io/javaee-spec/javadocs/package-list"))
+ url.set(URL("https://jakarta.ee/specifications/platform/9/apidocs/"))
}
}
}
@@ -157,20 +157,17 @@ tasks {
dokkaJavadoc {
dokkaSourceSets {
configureEach {
- jdkVersion.set(8)
includes.from("config/dokka/packages.md")
externalDocumentationLink {
- url.set(URL("https://javaee.github.io/javaee-spec/javadocs/"))
- packageListUrl.set(URL("https://javaee.github.io/javaee-spec/javadocs/package-list"))
+ url.set(URL("https://jakarta.ee/specifications/platform/9/apidocs/"))
}
}
}
- dependsOn(dokkaHtml)
}
val copyToDeploy by registering(Copy::class) {
from(configurations.runtimeClasspath) {
- exclude("annotations-*.jar")
+ exclude("annotations-*.jar", "jakarta.servlet-*.jar")
}
from(jar)
into(deployDir)
@@ -179,7 +176,7 @@ tasks {
register("deploy") {
description = "Copies all needed files to the $deployDir directory."
group = PublishingPlugin.PUBLISH_TASK_GROUP
- dependsOn(build, jar)
+ dependsOn(clean, wrapper, build, jar)
outputs.dir(deployDir)
inputs.files(copyToDeploy)
mustRunAfter(clean)
diff --git a/config/detekt/baseline.xml b/config/detekt/baseline.xml
index 7568296..bd755dd 100644
--- a/config/detekt/baseline.xml
+++ b/config/detekt/baseline.xml
@@ -3,10 +3,10 @@
ComplexMethod:Akismet.kt$Akismet$private fun buildFormBody(comment: AkismetComment): FormBody
- ComplexMethod:AkismetComment.kt$AkismetComment$ @Suppress("DuplicatedCode") override fun equals(other: Any?): Boolean
+ ComplexMethod:AkismetComment.kt$AkismetComment$@Suppress("DuplicatedCode") override fun equals(other: Any?): Boolean
MagicNumber:Akismet.kt$Akismet$12
MagicNumber:Akismet.kt$Akismet$8
NestedBlockDepth:AkismetTest.kt$fun getKey(key: String): String
- ReturnCount:Akismet.kt$Akismet$ @JvmOverloads fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean
+ ReturnCount:Akismet.kt$Akismet$@JvmOverloads fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html
index 84c0df2..584b552 100644
--- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html
+++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html
@@ -42,30 +42,30 @@ if(savedDarkMode === true){
-
+
AkismetComment
-
+
Sources
-
+
-
+
@@ -73,10 +73,11 @@ if(savedDarkMode === true){
-
+