build.gradle.kts

Sat, 17 Aug 2024 12:08:34 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 17 Aug 2024 12:08:34 +0200
changeset 322
7b154ddd29e3
parent 302
a27af2669825
child 324
61b16fc21f4d
permissions
-rw-r--r--

release version 1.3.0

302
a27af2669825 upgrade to jvm 21 and kotlin 2.0
Mike Becker <universe@uap-core.de>
parents: 299
diff changeset
1 import org.jetbrains.kotlin.gradle.dsl.JvmTarget
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 plugins {
302
a27af2669825 upgrade to jvm 21 and kotlin 2.0
Mike Becker <universe@uap-core.de>
parents: 299
diff changeset
4 kotlin("jvm") version "2.0.0"
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 war
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 group = "de.uapcore"
302
a27af2669825 upgrade to jvm 21 and kotlin 2.0
Mike Becker <universe@uap-core.de>
parents: 299
diff changeset
8 version = "1.3.0"
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 repositories {
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 mavenCentral()
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13
275
b199f9cf1a75 update versions - fixes #269
Mike Becker <universe@uap-core.de>
parents: 274
diff changeset
14 tasks.withType<JavaCompile>().configureEach {
302
a27af2669825 upgrade to jvm 21 and kotlin 2.0
Mike Becker <universe@uap-core.de>
parents: 299
diff changeset
15 targetCompatibility = "21"
275
b199f9cf1a75 update versions - fixes #269
Mike Becker <universe@uap-core.de>
parents: 274
diff changeset
16 }
b199f9cf1a75 update versions - fixes #269
Mike Becker <universe@uap-core.de>
parents: 274
diff changeset
17
297
24155683fc89 add another stupid magic command to gradle file because things stop working by default
Mike Becker <universe@uap-core.de>
parents: 295
diff changeset
18 tasks.test {
24155683fc89 add another stupid magic command to gradle file because things stop working by default
Mike Becker <universe@uap-core.de>
parents: 295
diff changeset
19 useJUnitPlatform()
24155683fc89 add another stupid magic command to gradle file because things stop working by default
Mike Becker <universe@uap-core.de>
parents: 295
diff changeset
20 }
24155683fc89 add another stupid magic command to gradle file because things stop working by default
Mike Becker <universe@uap-core.de>
parents: 295
diff changeset
21
258
564ae07a6def fix gradle builds with recent IntelliJ
Mike Becker <universe@uap-core.de>
parents: 256
diff changeset
22 tasks.jar {
564ae07a6def fix gradle builds with recent IntelliJ
Mike Becker <universe@uap-core.de>
parents: 256
diff changeset
23 enabled = false
564ae07a6def fix gradle builds with recent IntelliJ
Mike Becker <universe@uap-core.de>
parents: 256
diff changeset
24 }
564ae07a6def fix gradle builds with recent IntelliJ
Mike Becker <universe@uap-core.de>
parents: 256
diff changeset
25
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 tasks.war {
258
564ae07a6def fix gradle builds with recent IntelliJ
Mike Becker <universe@uap-core.de>
parents: 256
diff changeset
27 duplicatesStrategy = DuplicatesStrategy.WARN
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 archiveFileName.set("lightpit.war")
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 from("src/main/resources")
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31
262
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
32 val libsAreProvided = true
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33 kotlin {
302
a27af2669825 upgrade to jvm 21 and kotlin 2.0
Mike Becker <universe@uap-core.de>
parents: 299
diff changeset
34 compilerOptions {
a27af2669825 upgrade to jvm 21 and kotlin 2.0
Mike Becker <universe@uap-core.de>
parents: 299
diff changeset
35 jvmTarget.set(JvmTarget.JVM_21)
a27af2669825 upgrade to jvm 21 and kotlin 2.0
Mike Becker <universe@uap-core.de>
parents: 299
diff changeset
36 }
a27af2669825 upgrade to jvm 21 and kotlin 2.0
Mike Becker <universe@uap-core.de>
parents: 299
diff changeset
37
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 sourceSets {
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 val main by getting {
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 dependencies {
262
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
41 arrayOf(
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
42 "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.0",
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
43 "org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1",
302
a27af2669825 upgrade to jvm 21 and kotlin 2.0
Mike Becker <universe@uap-core.de>
parents: 299
diff changeset
44 "org.postgresql:postgresql:42.7.3"
262
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
45 ).forEach {
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
46 if (libsAreProvided) compileOnly(it) else implementation(it)
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
47 }
254
55ca6cafc3dd #233 migrate to Jakarta EE and update dependencies
Mike Becker <universe@uap-core.de>
parents: 247
diff changeset
48 compileOnly("jakarta.servlet:jakarta.servlet-api:6.0.0")
275
b199f9cf1a75 update versions - fixes #269
Mike Becker <universe@uap-core.de>
parents: 274
diff changeset
49 val flexmarkVersion = "0.64.8"
166
6eede6088d41 minimize footprint of flexmark - fixes #116
Mike Becker <universe@uap-core.de>
parents: 162
diff changeset
50 implementation("com.vladsch.flexmark:flexmark:${flexmarkVersion}")
6eede6088d41 minimize footprint of flexmark - fixes #116
Mike Becker <universe@uap-core.de>
parents: 162
diff changeset
51 implementation("com.vladsch.flexmark:flexmark-util-data:${flexmarkVersion}")
6eede6088d41 minimize footprint of flexmark - fixes #116
Mike Becker <universe@uap-core.de>
parents: 162
diff changeset
52 implementation("com.vladsch.flexmark:flexmark-ext-tables:${flexmarkVersion}")
6eede6088d41 minimize footprint of flexmark - fixes #116
Mike Becker <universe@uap-core.de>
parents: 162
diff changeset
53 implementation("com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:${flexmarkVersion}")
254
55ca6cafc3dd #233 migrate to Jakarta EE and update dependencies
Mike Becker <universe@uap-core.de>
parents: 247
diff changeset
54 implementation("io.github.java-diff-utils:java-diff-utils:4.12")
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56 }
279
d73537b925af start implementation of HgConnector
Mike Becker <universe@uap-core.de>
parents: 275
diff changeset
57 val test by getting {
d73537b925af start implementation of HgConnector
Mike Becker <universe@uap-core.de>
parents: 275
diff changeset
58 dependencies {
d73537b925af start implementation of HgConnector
Mike Becker <universe@uap-core.de>
parents: 275
diff changeset
59 implementation("org.jetbrains.kotlin:kotlin-test-junit5")
302
a27af2669825 upgrade to jvm 21 and kotlin 2.0
Mike Becker <universe@uap-core.de>
parents: 299
diff changeset
60 runtimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.3")
279
d73537b925af start implementation of HgConnector
Mike Becker <universe@uap-core.de>
parents: 275
diff changeset
61 }
d73537b925af start implementation of HgConnector
Mike Becker <universe@uap-core.de>
parents: 275
diff changeset
62 }
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 }

mercurial