Sat, 06 Jan 2024 20:31:14 +0100
add language selection cookie - fixes #352
1 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3 plugins {
4 kotlin("jvm") version "1.9.0"
5 war
6 }
7 group = "de.uapcore"
8 version = "1.2.2"
10 repositories {
11 mavenCentral()
12 }
14 tasks.withType<KotlinCompile>().configureEach {
15 kotlinOptions.jvmTarget = "11"
16 }
18 tasks.withType<JavaCompile>().configureEach {
19 targetCompatibility = "11"
20 }
22 tasks.jar {
23 enabled = false
24 }
26 tasks.war {
27 duplicatesStrategy = DuplicatesStrategy.WARN
28 archiveFileName.set("lightpit.war")
29 from("src/main/resources")
30 }
32 val libsAreProvided = true
33 kotlin {
34 sourceSets {
35 val main by getting {
36 dependencies {
37 arrayOf(
38 "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.0",
39 "org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1",
40 "org.postgresql:postgresql:42.7.1"
41 ).forEach {
42 if (libsAreProvided) compileOnly(it) else implementation(it)
43 }
44 compileOnly("jakarta.servlet:jakarta.servlet-api:6.0.0")
45 val flexmarkVersion = "0.64.8"
46 implementation("com.vladsch.flexmark:flexmark:${flexmarkVersion}")
47 implementation("com.vladsch.flexmark:flexmark-util-data:${flexmarkVersion}")
48 implementation("com.vladsch.flexmark:flexmark-ext-tables:${flexmarkVersion}")
49 implementation("com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:${flexmarkVersion}")
50 implementation("io.github.java-diff-utils:java-diff-utils:4.12")
51 }
52 }
53 val test by getting {
54 dependencies {
55 implementation("org.jetbrains.kotlin:kotlin-test-junit5")
56 runtimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0")
57 }
58 }
59 }
60 }