diff --git a/.gitignore b/.gitignore index c6b13e4..1808834 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ lib/bld/** !lib/bld/bld-wrapper.properties lib/compile/ lib/runtime/ -lib/provided/ lib/standalone/ lib/test/ diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 54d38d2..0dd4b35 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,13 +1,6 @@ - - - - + \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 09fec20..c27baae 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2019-2024, Erik C. Thauvin (erik@thauvin.net) +Copyright (c) 2019-2023, Erik C. Thauvin (erik@thauvin.net) All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index 9e41b8e..c19ce47 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-2.0.0-7f52ff)](https://kotlinlang.org/) +[![Kotlin](https://img.shields.io/badge/kotlin-1.9.24-7f52ff)](https://kotlinlang.org/) [![bld](https://img.shields.io/badge/1.9.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) [![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/) @@ -100,7 +100,7 @@ AkismetComment(request = context.getRequest()) This will ensure that the user's IP, agent, referrer and various environment variables are automatically extracted from the request. -[View Full Example](https://github.com/ethauvin/akismet-kotlin/blob/master/examples/gradle/src/main/kotlin/com/example/AkismetServlet.kt) +[View Full Example](https://github.com/ethauvin/akismet-kotlin/blob/master/examples/src/main/kotlin/com/example/AkismetServlet.kt) ## JSON diff --git a/examples/bld/lib/bld/bld-wrapper.properties b/examples/bld/lib/bld/bld-wrapper.properties index b32aeb6..113b890 100644 --- a/examples/bld/lib/bld/bld-wrapper.properties +++ b/examples/bld/lib/bld/bld-wrapper.properties @@ -1,6 +1,6 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true -bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.7 +bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.4 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.downloadLocation= bld.sourceDirectories= diff --git a/examples/gradle/build.gradle.kts b/examples/gradle/build.gradle.kts index b9c5436..253829e 100644 --- a/examples/gradle/build.gradle.kts +++ b/examples/gradle/build.gradle.kts @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("application") id("com.github.ben-manes.versions") version "0.51.0" - kotlin("jvm") version "2.0.0" + kotlin("jvm") version "1.9.24" } defaultTasks(ApplicationPlugin.TASK_RUN_NAME) diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 1267563..1d72b47 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -3,7 +3,7 @@ bld.downloadExtensionSources=true bld.extensions-detekt=com.uwyn.rife2:bld-detekt:0.9.2 bld.extensions=com.uwyn.rife2:bld-generated-version:0.9.5 bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.5 -bld.extensions-kotlin=com.uwyn.rife2:bld-kotlin:0.9.7 +bld.extensions-kotlin=com.uwyn.rife2:bld-kotlin:0.9.4 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.downloadLocation= bld.sourceDirectories= diff --git a/lib/provided/kotlin-serialization-compiler-plugin-1.9.24-sources.jar b/lib/provided/kotlin-serialization-compiler-plugin-1.9.24-sources.jar new file mode 100644 index 0000000..15ef69b Binary files /dev/null and b/lib/provided/kotlin-serialization-compiler-plugin-1.9.24-sources.jar differ diff --git a/lib/provided/kotlin-serialization-compiler-plugin-1.9.24.jar b/lib/provided/kotlin-serialization-compiler-plugin-1.9.24.jar new file mode 100644 index 0000000..a710db5 Binary files /dev/null and b/lib/provided/kotlin-serialization-compiler-plugin-1.9.24.jar differ diff --git a/src/bld/java/net/thauvin/erik/AkismetBuild.java b/src/bld/java/net/thauvin/erik/AkismetBuild.java index 2f7d983..82c312e 100644 --- a/src/bld/java/net/thauvin/erik/AkismetBuild.java +++ b/src/bld/java/net/thauvin/erik/AkismetBuild.java @@ -1,7 +1,7 @@ /* * AkismetBuild.java * - * Copyright 2019-2024 Erik C. Thauvin (erik@thauvin.net) + * 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: @@ -53,7 +53,6 @@ import static rife.bld.dependencies.Repository.*; import static rife.bld.dependencies.Scope.*; public class AkismetBuild extends Project { - private static final String DETEKT_BASELINE = "config/detekt/baseline.xml"; final File srcMainKotlin = new File(srcMainDirectory(), "kotlin"); public AkismetBuild() { @@ -67,7 +66,7 @@ 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(1, 9, 24); scope(compile) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)) .include(dependency("com.squareup.okhttp3", "okhttp", okHttp)) @@ -77,7 +76,7 @@ public class AkismetBuild extends Project { scope(provided) .include(dependency("org.jetbrains.kotlin", "kotlin-serialization-compiler-plugin", kotlin)); scope(test) - .include(dependency("org.mockito", "mockito-core", version(5, 12, 0))) + .include(dependency("org.mockito", "mockito-core", version(5, 11, 0))) .include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin)) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 2))) @@ -145,7 +144,7 @@ public class AkismetBuild extends Project { public void detekt() throws ExitStatusException, IOException, InterruptedException { new DetektOperation() .fromProject(this) - .baseline(DETEKT_BASELINE) + .baseline("config/detekt/baseline.xml") .execute(); } @@ -153,7 +152,7 @@ public class AkismetBuild extends Project { public void detektBaseline() throws ExitStatusException, IOException, InterruptedException { new DetektOperation() .fromProject(this) - .baseline(DETEKT_BASELINE) + .baseline("config/detekt/baseline.xml") .createBaseline(true) .execute(); } diff --git a/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt b/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt index 2c34032..8311f88 100644 --- a/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt +++ b/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt @@ -1,7 +1,7 @@ /* * Akismet.kt * - * Copyright 2019-2024 Erik C. Thauvin (erik@thauvin.net) + * 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: diff --git a/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt b/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt index dbfcc1c..c7ae7af 100644 --- a/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt +++ b/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt @@ -1,7 +1,7 @@ /* * AkismetComment.kt * - * Copyright 2019-2024 Erik C. Thauvin (erik@thauvin.net) + * 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: diff --git a/src/main/kotlin/net/thauvin/erik/akismet/GeneratedVersion.kt b/src/main/kotlin/net/thauvin/erik/akismet/GeneratedVersion.kt index bc2ee49..8f63ec2 100644 --- a/src/main/kotlin/net/thauvin/erik/akismet/GeneratedVersion.kt +++ b/src/main/kotlin/net/thauvin/erik/akismet/GeneratedVersion.kt @@ -1,34 +1,3 @@ -/* - * GeneratedVersion.kt - * - * Copyright 2019-2024 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. - */ - /* * This file is automatically generated. * Do not modify! -- ALL CHANGES WILL BE ERASED! diff --git a/src/test/kotlin/net/thauvin/erik/akismet/AkismetTest.kt b/src/test/kotlin/net/thauvin/erik/akismet/AkismetTest.kt index 31f3376..2d9cb80 100644 --- a/src/test/kotlin/net/thauvin/erik/akismet/AkismetTest.kt +++ b/src/test/kotlin/net/thauvin/erik/akismet/AkismetTest.kt @@ -1,7 +1,7 @@ /* * AkismetTest.kt * - * Copyright 2019-2024 Erik C. Thauvin (erik@thauvin.net) + * 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: