build.gradle.kts

Sat, 15 Jul 2023 13:45:48 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 15 Jul 2023 13:45:48 +0200
changeset 276
2a169e4d1d13
parent 275
b199f9cf1a75
child 279
d73537b925af
permissions
-rw-r--r--

fix typo in component node field name - fixes #268

151
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents: 147
diff changeset
1 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
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 {
275
b199f9cf1a75 update versions - fixes #269
Mike Becker <universe@uap-core.de>
parents: 274
diff changeset
4 kotlin("jvm") version "1.9.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"
274
e529a7cd4f17 improve sort captions
Mike Becker <universe@uap-core.de>
parents: 272
diff changeset
8 version = "1.0.1"
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
151
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents: 147
diff changeset
14 tasks.withType<KotlinCompile>().configureEach {
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents: 147
diff changeset
15 kotlinOptions.jvmTarget = "11"
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents: 147
diff changeset
16 }
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents: 147
diff changeset
17
275
b199f9cf1a75 update versions - fixes #269
Mike Becker <universe@uap-core.de>
parents: 274
diff changeset
18 tasks.withType<JavaCompile>().configureEach {
b199f9cf1a75 update versions - fixes #269
Mike Becker <universe@uap-core.de>
parents: 274
diff changeset
19 targetCompatibility = "11"
b199f9cf1a75 update versions - fixes #269
Mike Becker <universe@uap-core.de>
parents: 274
diff changeset
20 }
b199f9cf1a75 update versions - fixes #269
Mike Becker <universe@uap-core.de>
parents: 274
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 {
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 sourceSets {
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35 val main by getting {
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 dependencies {
262
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
37 arrayOf(
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
38 "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
39 "org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1",
275
b199f9cf1a75 update versions - fixes #269
Mike Becker <universe@uap-core.de>
parents: 274
diff changeset
40 "org.postgresql:postgresql:42.6.0"
262
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
41 ).forEach {
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
42 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
43 }
254
55ca6cafc3dd #233 migrate to Jakarta EE and update dependencies
Mike Becker <universe@uap-core.de>
parents: 247
diff changeset
44 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
45 val flexmarkVersion = "0.64.8"
166
6eede6088d41 minimize footprint of flexmark - fixes #116
Mike Becker <universe@uap-core.de>
parents: 162
diff changeset
46 implementation("com.vladsch.flexmark:flexmark:${flexmarkVersion}")
6eede6088d41 minimize footprint of flexmark - fixes #116
Mike Becker <universe@uap-core.de>
parents: 162
diff changeset
47 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
48 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
49 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
50 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
51 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54 }

mercurial