Bump Kotlin to version 2.0.20

This commit is contained in:
Erik C. Thauvin 2024-09-19 18:19:07 -07:00
parent fdd10f1399
commit 871174e64a
Signed by: erik
GPG key ID: 776702A6A2DA330E
8 changed files with 15 additions and 16 deletions

View file

@ -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

View file

@ -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

View file

@ -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.24-7f52ff)](https://kotlinlang.org/)
[![Kotlin](https://img.shields.io/badge/kotlin-2.0.20-7f52ff)](https://kotlinlang.org/)
[![bld](https://img.shields.io/badge/2.1.0-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/)

View file

@ -5,7 +5,6 @@
<ID>CyclomaticComplexMethod:Akismet.kt$Akismet$private fun buildFormBody(comment: AkismetComment): FormBody</ID>
<ID>CyclomaticComplexMethod:AkismetComment.kt$AkismetComment$@Suppress("DuplicatedCode") override fun equals(other: Any?): Boolean</ID>
<ID>LongParameterList:AkismetServlet.kt$AkismetServlet$( id: String, name: String?, email: String?, date: String?, comment: String?, json: String, isSpam: Boolean )</ID>
<ID>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&lt;String, String&gt; = emptyMap() )</ID>
<ID>MagicNumber:Akismet.kt$Akismet$12</ID>
<ID>MagicNumber:Akismet.kt$Akismet$8</ID>
<ID>NestedBlockDepth:Akismet.kt$Akismet$@JvmOverloads fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean</ID>

View file

@ -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)

Binary file not shown.

View file

@ -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

View file

@ -71,14 +71,14 @@ 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)