1
- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
2
3
3
plugins {
4
4
id(" maven-publish" )
@@ -12,8 +12,8 @@ plugins {
12
12
}
13
13
14
14
group = " de.otto.babbage"
15
- version = " 0.5.1 "
16
- java.sourceCompatibility = JavaVersion .VERSION_17
15
+ version = " 0.5.2-SNAPSHOT "
16
+ java.sourceCompatibility = JavaVersion .VERSION_21
17
17
18
18
repositories {
19
19
mavenCentral()
@@ -29,39 +29,42 @@ dependencies {
29
29
30
30
implementation(" org.jetbrains.kotlin:kotlin-reflect" )
31
31
implementation(" org.jetbrains.kotlin:kotlin-stdlib-jdk8" )
32
- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-reactor:1.6.4" )
33
- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" )
34
- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.6.4" )
32
+ val coroutinesVersion = " 1.6.4"
33
+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-reactor:$coroutinesVersion " )
34
+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion " )
35
+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutinesVersion " )
35
36
36
37
testImplementation(" org.springframework.boot:spring-boot-starter-test" )
37
- testImplementation(" org.junit.jupiter:junit-jupiter:5.9.2" )
38
- testImplementation(" io.kotest:kotest-runner-junit5:5.5.5" )
39
- testImplementation(" io.kotest:kotest-assertions-core:5.5.5" )
38
+ testImplementation(" org.junit.jupiter:junit-jupiter:5.11.4" )
39
+ val koTestVersion = " 5.9.1"
40
+ testImplementation(" io.kotest:kotest-runner-junit5:$koTestVersion " )
41
+ testImplementation(" io.kotest:kotest-assertions-core:$koTestVersion " )
40
42
41
- testImplementation(" io.mockk:mockk:1.13.4" )
42
- testImplementation(" io.mockk:mockk-jvm:1.13.4" )
43
+ val mockkVersion = " 1.13.16"
44
+ testImplementation(" io.mockk:mockk:$mockkVersion " )
45
+ testImplementation(" io.mockk:mockk-jvm:$mockkVersion " )
43
46
44
47
/* *
45
48
* Specify versions here for dependencies that are not used by every module.
46
49
* The dependency have to be configured in the module build.gradle.kts without a version.
47
50
*/
48
51
constraints {
49
- api(" software.amazon.awssdk:auth:2.20.7" )
50
- api(" software.amazon.awssdk:s3:2.20.7" )
51
- api(" software.amazon.awssdk:ssm:2.20.7" )
52
+ val awsSdkVersion = " 2.30.2"
53
+ api(" software.amazon.awssdk:auth:$awsSdkVersion " )
54
+ api(" software.amazon.awssdk:s3:$awsSdkVersion " )
55
+ api(" software.amazon.awssdk:ssm:$awsSdkVersion " )
52
56
53
57
// test dependencies
54
- api(" com.ninja-squad:springmockk:4.0.0" )
55
- api(" org.jsoup:jsoup:1.15.3" )
56
- api(" io.kotest.extensions:kotest-assertions-jsoup:1.0.0" )
58
+ api(" com.ninja-squad:springmockk:4.0.2" )
59
+ api(" org.jsoup:jsoup:1.18.3" )
57
60
}
58
61
59
62
}
60
63
61
- tasks.withType< KotlinCompile > {
62
- kotlinOptions {
63
- jvmTarget = " 17 "
64
- allWarningsAsErrors = true
64
+ kotlin {
65
+ compilerOptions {
66
+ jvmTarget.set( JvmTarget . JVM_21 )
67
+ allWarningsAsErrors.set( true )
65
68
}
66
69
}
67
70
@@ -114,24 +117,3 @@ publishing {
114
117
}
115
118
}
116
119
117
- /* *
118
- * The generated MavenPom has two `dependencyManagement` sections, which is invalid. There is a workaround to fix this
119
- * issue:
120
- * https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/257#issuecomment-895790557
121
- */
122
- tasks.withType<GenerateMavenPom >().all {
123
- doLast {
124
- val file = File (" $buildDir /publications/${base.archivesName.get()} /pom-default.xml" )
125
- var text = file.readText()
126
- val regex =
127
- " (?s)(<dependencyManagement>.+?<dependencies>)(.+?)(</dependencies>.+?</dependencyManagement>)" .toRegex()
128
- val matcher = regex.find(text)
129
- if (matcher != null ) {
130
- text = regex.replaceFirst(text, " " )
131
- val firstDeps = matcher.groups[2 ]!! .value
132
- text = regex.replaceFirst(text, " $1$2$firstDeps $3" )
133
- }
134
- file.writeText(text)
135
- }
136
- }
137
-
0 commit comments