1+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
12
23group = " io.github.abaddon.kcqrs"
34
45object Meta {
56 const val desc = " KCQRS EventStoreDB repository library"
67 const val license = " Apache-2.0"
78 const val githubRepo = " abaddon/kcqrs-EventStoreDB"
8- const val release = " https://s01.oss.sonatype.org/service/local/"
9- const val snapshot = " https://s01.oss.sonatype.org/content/repositories/snapshots/"
109 const val developerName = " Stefano Longhi"
1110 const val developerOrganization = " "
1211 const val organizationUrl = " https://github.com/abaddon"
1312}
1413
1514object Versions {
16- const val kcqrsCoreVersion = " 0.0.7"
17- const val kcqrsTestVersion = " 0.0.3"
18- const val eventStoreDBVersion = " 3.0.1"
19- const val slf4jVersion = " 1.7.25"
20- const val kotlinVersion = " 1.6.0"
21- const val kotlinCoroutineVersion = " 1.6.0"
22- const val jacksonModuleKotlinVersion = " 2.13.3"
23- const val testContainerVersion = " 1.16.3"
24- const val junitJupiterVersion = " 5.7.0"
25- const val jacocoToolVersion = " 0.8.7"
26- const val jvmTarget = " 11"
27- const val hopliteVersion= " 1.4.16"
15+ // Update these versions only if compatibility is confirmed with your library
16+ const val kcqrsCoreVersion = " 0.0.10"
17+ const val kcqrsTestVersion = " 0.0.11"
18+
19+ // Updated dependencies
20+ const val kurrentClientVersion = " 1.0.1"
21+ const val slf4jVersion = " 2.0.12"
22+ const val kotlinVersion = " 2.1.21"
23+ const val kotlinCoroutineVersion = " 1.10.2"
24+ const val jacksonModuleKotlinVersion = " 2.16.1"
25+ const val testContainerVersion = " 1.21.0"
26+ const val junitJupiterVersion = " 5.10.2"
27+ const val jacocoToolVersion = " 0.8.11"
28+ const val jvmTarget = " 21"
29+ const val hopliteVersion = " 2.7.5"
2830}
2931
3032plugins {
31- kotlin(" jvm" ) version " 1. 8.10"
32- id(" io.github.gradle-nexus.publish-plugin" ) version " 1.1.0"
33- id(" com.palantir.git-version" ) version " 2 .0.0"
33+ kotlin(" jvm" ) version " 2.1.21 " // Updated from 1. 8.10
34+ id(" io.github.gradle-nexus.publish-plugin" ) version " 2.0.0 " // Updated from 1.1.0
35+ id(" com.palantir.git-version" ) version " 3 .0.0" // Updated from 2.0.0
3436 jacoco
3537 `maven- publish`
3638 signing
@@ -39,15 +41,14 @@ plugins {
3941val versionDetails: groovy.lang.Closure < com.palantir.gradle.gitversion.VersionDetails > by extra
4042val details = versionDetails()
4143
42- val lastTag= details.lastTag.substring(1 )
43- val snapshotTag= {
44- val list= lastTag.split(" ." )
45- val third= (list.last().toInt() + 1 ).toString()
44+ val lastTag = details.lastTag.substring(1 )
45+ val snapshotTag = {
46+ val list = lastTag.split(" ." )
47+ val third = (list.last().toInt() + 1 ).toString()
4648 " ${list[0 ]} .${list[1 ]} .$third -SNAPSHOT"
4749}
4850version = if (details.isCleanTag) lastTag else snapshotTag()
4951
50-
5152repositories {
5253 mavenCentral()
5354 mavenLocal()
@@ -57,7 +58,6 @@ repositories {
5758 snapshotsOnly()
5859 }
5960 }
60-
6161}
6262
6363dependencies {
@@ -76,7 +76,7 @@ dependencies {
7676 implementation(" com.sksamuel.hoplite:hoplite-yaml:${Versions .hopliteVersion} " )
7777
7878 // EventStoreDB
79- implementation(" com.eventstore:db -client-java :${Versions .eventStoreDBVersion } " )
79+ implementation(" io.kurrent:kurrentdb -client:${Versions .kurrentClientVersion } " )
8080
8181 // Test
8282 testImplementation(kotlin(" test" ))
@@ -107,21 +107,22 @@ tasks.jacocoTestReport {
107107}
108108
109109tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > () {
110- kotlinOptions .jvmTarget = Versions .jvmTarget
110+ compilerOptions .jvmTarget.set( JvmTarget .fromTarget( Versions .jvmTarget))
111111}
112112
113113java {
114+ toolchain {
115+ languageVersion.set(JavaLanguageVersion .of(21 )) // Added to explicitly set Java toolchain
116+ }
114117 withSourcesJar()
115118 withJavadocJar()
116119}
117120
118121signing {
119122 val signingKey = providers
120123 .environmentVariable(" GPG_SIGNING_KEY" )
121- .forUseAtConfigurationTime()
122124 val signingPassphrase = providers
123125 .environmentVariable(" GPG_SIGNING_PASSPHRASE" )
124- .forUseAtConfigurationTime()
125126 if (signingKey.isPresent && signingPassphrase.isPresent) {
126127 useInMemoryPgpKeys(signingKey.get(), signingPassphrase.get())
127128 val extension = extensions
@@ -148,9 +149,9 @@ publishing {
148149 }
149150 developers {
150151 developer {
151- name.set(" ${ Meta .developerName} " )
152- organization.set(" ${ Meta .developerOrganization} " )
153- organizationUrl.set(" ${ Meta .organizationUrl} " )
152+ name.set(Meta .developerName)
153+ organization.set(Meta .developerOrganization)
154+ organizationUrl.set(Meta .organizationUrl)
154155 }
155156 }
156157 scm {
@@ -174,19 +175,12 @@ publishing {
174175
175176nexusPublishing {
176177 repositories {
178+ // see https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/#configuration
177179 sonatype {
178- nexusUrl.set(uri(Meta .release))
179- snapshotRepositoryUrl.set(uri(Meta .snapshot))
180- val ossrhUsername = providers
181- .environmentVariable(" OSSRH_USERNAME" )
182- .forUseAtConfigurationTime()
183- val ossrhPassword = providers
184- .environmentVariable(" OSSRH_PASSWORD" )
185- .forUseAtConfigurationTime()
186- if (ossrhUsername.isPresent && ossrhPassword.isPresent) {
187- username.set(ossrhUsername.get())
188- password.set(ossrhPassword.get())
189- }
180+ nexusUrl.set(uri(" https://ossrh-staging-api.central.sonatype.com/service/local/" ))
181+ snapshotRepositoryUrl.set(uri(" https://central.sonatype.com/repository/maven-snapshots/" ))
182+ username = providers.environmentVariable(" SONATYPE_USERNAME" )
183+ password = providers.environmentVariable(" SONATYPE_TOKEN" )
190184 }
191185 }
192- }
186+ }
0 commit comments