From 4eae66f87370213816b6698427dd2f2234e05245 Mon Sep 17 00:00:00 2001 From: Argi Danurahadi Date: Fri, 8 Nov 2024 17:31:12 +0700 Subject: [PATCH] bump Kotlin version to 2.0.21, bump JDK version to 22.0.2, bump Vert.x, Ebean and other lib versions --- build.gradle | 34 +++++++++---------- buildSrc/build.gradle | 4 +-- ...framework.kotlin-common-conventions.gradle | 8 ++--- ebean/build.gradle | 2 +- ensure-java-21 | 2 +- ensure-java-17 => ensure-java-22 | 8 ++--- .../extra/extension/pebble/PebbleSpec.kt | 2 +- .../extra/extension/pebble/TemplateSpec.kt | 2 +- gradle.properties | 5 +-- gradle/wrapper/gradle-wrapper.properties | 2 +- jitpack.yml | 6 ++-- 11 files changed, 35 insertions(+), 40 deletions(-) rename ensure-java-17 => ensure-java-22 (58%) diff --git a/build.gradle b/build.gradle index efd48b9..0119665 100755 --- a/build.gradle +++ b/build.gradle @@ -1,39 +1,39 @@ ext { version = project.property('version') - kotlinVersion = "2.0.20-Beta1" - vertxVersion = '4.5.8' - pebbleVersion = '3.2.2' + kotlinVersion = "2.0.21" + vertxVersion = '4.5.10' + pebbleVersion = '3.2.1' - coroutineVersion = "1.9.0-RC" + coroutineVersion = "1.9.0" arrowVersion = "0.7.2" - detektVersion = "1.23.6" + detektVersion = "1.23.7" - logbackVersion = '1.5.6' - logstashLogbackEncoderVersion = '7.4' + logbackVersion = '1.5.12' + logstashLogbackEncoderVersion = '8.0' - commonsLangVersion = '3.13.0' - commonsIOVersion = '2.13.0' - commonsCodecVersion = '1.16.0' + commonsLangVersion = '3.17.0' + commonsIOVersion = '2.17.0' + commonsCodecVersion = '1.17.1' - daggerVersion = '2.51.1' - jacksonVersion = '2.17.1' + daggerVersion = '2.52' + jacksonVersion = '2.18.1' morphiaVersion = '1.3.2' - quartzVersion = "2.5.0-rc1" + quartzVersion = "2.5.0-rc2" jakartaElVersion = '4.0.2' - hibernateValidatorVersion = '8.0.1.Final' + hibernateValidatorVersion = '9.0.0.Beta3' elImplVersion = "2.2" jBCryptVersion = '0.4.1' guavaVersion = '23.5-jre' asciiTableVersion = '0.3.2' - ebeanVersion = "15.4.0" + ebeanVersion = "15.8.0" ebeanAutotuneVersion = "14.0.0" jdbiVersion = "3.39.1" - hikariCPVersion = "5.1.0" - flywayVersion = "10.15.0" + hikariCPVersion = "6.0.0" + flywayVersion = "10.20.1" restAssuredVersion = '5.3.1' embeddedMongoVersion = '2.0.0' diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index ab1ee76..071f31b 100755 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -5,8 +5,8 @@ plugins { id 'groovy-gradle-plugin' } -def kotlinVersion = '2.0.20-Beta1' -def detektVersion = '1.23.6' +def kotlinVersion = '2.0.21' +def detektVersion = '1.23.7' repositories { // Use the plugin portal to apply community plugins in convention plugins. diff --git a/buildSrc/src/main/groovy/yoframework.kotlin-common-conventions.gradle b/buildSrc/src/main/groovy/yoframework.kotlin-common-conventions.gradle index e2175d8..ad3d383 100755 --- a/buildSrc/src/main/groovy/yoframework.kotlin-common-conventions.gradle +++ b/buildSrc/src/main/groovy/yoframework.kotlin-common-conventions.gradle @@ -59,7 +59,7 @@ dependencies { } kotlin { - jvmToolchain(21) + jvmToolchain(22) } tasks { @@ -101,7 +101,7 @@ tasks { } jacoco { - toolVersion = "0.8.11" + toolVersion = "0.8.12" } jacocoTestReport { @@ -140,7 +140,7 @@ artifacts { } detekt { - toolVersion = "1.23.6" + toolVersion = "1.23.7" input = files("src/main/kotlin") buildUponDefaultConfig = true parallel = true @@ -155,7 +155,7 @@ detekt { sarif.enabled = false } } -tasks.detekt.jvmTarget = "17" +tasks.detekt.jvmTarget = "21" def pomConfig = { name = "Yo Framework" diff --git a/ebean/build.gradle b/ebean/build.gradle index 8813d7f..c831abe 100755 --- a/ebean/build.gradle +++ b/ebean/build.gradle @@ -1,7 +1,7 @@ plugins { // Apply the db convention plugin for shared build configuration between module / subprojects. id 'yoframework.kotlin-db-conventions' - id 'io.ebean' version '15.5.0' + id 'io.ebean' version '15.8.0' } dependencies { diff --git a/ensure-java-21 b/ensure-java-21 index ad9a9bd..9f508b5 100755 --- a/ensure-java-21 +++ b/ensure-java-21 @@ -9,7 +9,7 @@ if [ "$JV" != 21 ]; then echo "Installing sdkman..." curl -s "https://get.sdkman.io" | bash source ~/.sdkman/bin/sdkman-init.sh - sdk install java 21.0.1-zulu + sdk install java 21.0.5-zulu ;; use) echo "must source ~/.sdkman/bin/sdkman-init.sh" diff --git a/ensure-java-17 b/ensure-java-22 similarity index 58% rename from ensure-java-17 rename to ensure-java-22 index 536b737..bce30cd 100755 --- a/ensure-java-17 +++ b/ensure-java-22 @@ -1,15 +1,15 @@ #!/bin/bash -JV=$(java -version 2>&1 >/dev/null | head -1) -echo "$JV" | sed -E 's/^.*version "([^".]*)\.[^"]*".*$/\1/' +JV=`java -version 2>&1 >/dev/null | head -1` +echo $JV | sed -E 's/^.*version "([^".]*)\.[^"]*".*$/\1/' -if [ "$JV" != 11 ]; then +if [ "$JV" != 22 ]; then case "$1" in install) echo "Installing sdkman..." curl -s "https://get.sdkman.io" | bash source ~/.sdkman/bin/sdkman-init.sh - sdk install java 18.0.1-zulu + sdk install java 22.0.2-zulu ;; use) echo "must source ~/.sdkman/bin/sdkman-init.sh" diff --git a/extra/src/test/kotlin/id/yoframework/extra/extension/pebble/PebbleSpec.kt b/extra/src/test/kotlin/id/yoframework/extra/extension/pebble/PebbleSpec.kt index 54e6aaf..75c651b 100755 --- a/extra/src/test/kotlin/id/yoframework/extra/extension/pebble/PebbleSpec.kt +++ b/extra/src/test/kotlin/id/yoframework/extra/extension/pebble/PebbleSpec.kt @@ -68,7 +68,7 @@ object PebbleSpec : Spek({ } it("should able to compile file template") { - val randomSuffix = RandomStringUtils.randomAlphabetic(12) + val randomSuffix = RandomStringUtils.secureStrong() val location = "${tmpDir()}/test_template-$randomSuffix.peb" val templateString = """ diff --git a/extra/src/test/kotlin/id/yoframework/extra/extension/pebble/TemplateSpec.kt b/extra/src/test/kotlin/id/yoframework/extra/extension/pebble/TemplateSpec.kt index bc460aa..117175e 100755 --- a/extra/src/test/kotlin/id/yoframework/extra/extension/pebble/TemplateSpec.kt +++ b/extra/src/test/kotlin/id/yoframework/extra/extension/pebble/TemplateSpec.kt @@ -43,7 +43,7 @@ object TemplateSpec : Spek({ } on("handling file template") { - val randomSuffix = RandomStringUtils.randomAlphabetic(12) + val randomSuffix = RandomStringUtils.secureStrong() val location = "${tmpDir()}/test_template-$randomSuffix.peb" val templateString = """ diff --git a/gradle.properties b/gradle.properties index 0cdc2e7..f17b5cf 100755 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Set the project version -version=0.6 +version=0.7 # Enable K2 for KAPT compiler plugin kapt.use.k2=true @@ -19,7 +19,4 @@ org.gradle.parallel=true # Enable configure on demand org.gradle.configureondemand=true -# Enable new incremental compilation -kotlin.incremental.useClasspathSnapshot=true - kapt.include.compile.classpath=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9252e6a..9a0a0e2 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-rc-1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/jitpack.yml b/jitpack.yml index b53aadc..152a27f 100755 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,8 +1,6 @@ -#jdk: -# - openjdk17 before_install: - - ./ensure-java-21 install - - if ! ./ensure-java-21 use; then source ~/.sdkman/bin/sdkman-init.sh; fi + - ./ensure-java-22 install + - if ! ./ensure-java-22 use; then source ~/.sdkman/bin/sdkman-init.sh; fi install: - java -version - ./gradlew clean compile test detekt localPublish