build.gradle.kts

Sun, 08 Jan 2023 19:33:08 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 08 Jan 2023 19:33:08 +0100
changeset 272
edb6f12b334b
parent 262
c357c4e69b9e
child 274
e529a7cd4f17
permissions
-rw-r--r--

version 1.0 - finally

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 {
254
55ca6cafc3dd #233 migrate to Jakarta EE and update dependencies
Mike Becker <universe@uap-core.de>
parents: 247
diff changeset
4 kotlin("jvm") version "1.7.21"
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"
272
edb6f12b334b version 1.0 - finally
Mike Becker <universe@uap-core.de>
parents: 262
diff changeset
8 version = "1.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
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
258
564ae07a6def fix gradle builds with recent IntelliJ
Mike Becker <universe@uap-core.de>
parents: 256
diff changeset
18 tasks.jar {
564ae07a6def fix gradle builds with recent IntelliJ
Mike Becker <universe@uap-core.de>
parents: 256
diff changeset
19 enabled = false
564ae07a6def fix gradle builds with recent IntelliJ
Mike Becker <universe@uap-core.de>
parents: 256
diff changeset
20 }
564ae07a6def fix gradle builds with recent IntelliJ
Mike Becker <universe@uap-core.de>
parents: 256
diff changeset
21
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 tasks.war {
258
564ae07a6def fix gradle builds with recent IntelliJ
Mike Becker <universe@uap-core.de>
parents: 256
diff changeset
23 duplicatesStrategy = DuplicatesStrategy.WARN
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 archiveFileName.set("lightpit.war")
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 from("src/main/resources")
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27
262
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
28 val libsAreProvided = true
147
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 kotlin {
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30 sourceSets {
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31 val main by getting {
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32 dependencies {
262
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
33 arrayOf(
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
34 "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
35 "org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1",
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
36 "org.postgresql:postgresql:42.5.1"
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
37 ).forEach {
c357c4e69b9e make JSTL and postgres (optionally) runtime dependencies again
Mike Becker <universe@uap-core.de>
parents: 258
diff changeset
38 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
39 }
254
55ca6cafc3dd #233 migrate to Jakarta EE and update dependencies
Mike Becker <universe@uap-core.de>
parents: 247
diff changeset
40 compileOnly("jakarta.servlet:jakarta.servlet-api:6.0.0")
55ca6cafc3dd #233 migrate to Jakarta EE and update dependencies
Mike Becker <universe@uap-core.de>
parents: 247
diff changeset
41 val flexmarkVersion = "0.64.0"
166
6eede6088d41 minimize footprint of flexmark - fixes #116
Mike Becker <universe@uap-core.de>
parents: 162
diff changeset
42 implementation("com.vladsch.flexmark:flexmark:${flexmarkVersion}")
6eede6088d41 minimize footprint of flexmark - fixes #116
Mike Becker <universe@uap-core.de>
parents: 162
diff changeset
43 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
44 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
45 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
46 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
47 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 }
dfec8c5f8db0 migrates from maven to gradle (prepares kotlin migration)
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 }

mercurial