build.gradle.kts

changeset 302
a27af2669825
parent 299
238de141d189
child 324
61b16fc21f4d
equal deleted inserted replaced
301:f849eeee37de 302:a27af2669825
1 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile 1 import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2 2
3 plugins { 3 plugins {
4 kotlin("jvm") version "1.9.0" 4 kotlin("jvm") version "2.0.0"
5 war 5 war
6 } 6 }
7 group = "de.uapcore" 7 group = "de.uapcore"
8 version = "1.2.2" 8 version = "1.3.0"
9 9
10 repositories { 10 repositories {
11 mavenCentral() 11 mavenCentral()
12 } 12 }
13 13
14 tasks.withType<KotlinCompile>().configureEach {
15 kotlinOptions.jvmTarget = "11"
16 }
17
18 tasks.withType<JavaCompile>().configureEach { 14 tasks.withType<JavaCompile>().configureEach {
19 targetCompatibility = "11" 15 targetCompatibility = "21"
20 } 16 }
21 17
22 tasks.test { 18 tasks.test {
23 useJUnitPlatform() 19 useJUnitPlatform()
24 } 20 }
33 from("src/main/resources") 29 from("src/main/resources")
34 } 30 }
35 31
36 val libsAreProvided = true 32 val libsAreProvided = true
37 kotlin { 33 kotlin {
34 compilerOptions {
35 jvmTarget.set(JvmTarget.JVM_21)
36 }
37
38 sourceSets { 38 sourceSets {
39 val main by getting { 39 val main by getting {
40 dependencies { 40 dependencies {
41 arrayOf( 41 arrayOf(
42 "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.0", 42 "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.0",
43 "org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1", 43 "org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1",
44 "org.postgresql:postgresql:42.7.1" 44 "org.postgresql:postgresql:42.7.3"
45 ).forEach { 45 ).forEach {
46 if (libsAreProvided) compileOnly(it) else implementation(it) 46 if (libsAreProvided) compileOnly(it) else implementation(it)
47 } 47 }
48 compileOnly("jakarta.servlet:jakarta.servlet-api:6.0.0") 48 compileOnly("jakarta.servlet:jakarta.servlet-api:6.0.0")
49 val flexmarkVersion = "0.64.8" 49 val flexmarkVersion = "0.64.8"
55 } 55 }
56 } 56 }
57 val test by getting { 57 val test by getting {
58 dependencies { 58 dependencies {
59 implementation("org.jetbrains.kotlin:kotlin-test-junit5") 59 implementation("org.jetbrains.kotlin:kotlin-test-junit5")
60 runtimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") 60 runtimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.3")
61 } 61 }
62 } 62 }
63 } 63 }
64 } 64 }

mercurial