build.gradle.kts

Sat, 06 Jan 2024 20:32:56 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 06 Jan 2024 20:32:56 +0100
changeset 300
c7ee4cbfb86d
parent 299
238de141d189
permissions
-rw-r--r--

Added tag v1.2.2 for changeset 238de141d189

     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.test {
    23     useJUnitPlatform()
    24 }
    26 tasks.jar {
    27     enabled = false
    28 }
    30 tasks.war {
    31     duplicatesStrategy = DuplicatesStrategy.WARN
    32     archiveFileName.set("lightpit.war")
    33     from("src/main/resources")
    34 }
    36 val libsAreProvided = true
    37 kotlin {
    38     sourceSets {
    39         val main by getting {
    40             dependencies {
    41                 arrayOf(
    42                     "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.0",
    43                     "org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1",
    44                     "org.postgresql:postgresql:42.7.1"
    45                 ).forEach {
    46                     if (libsAreProvided) compileOnly(it) else implementation(it)
    47                 }
    48                 compileOnly("jakarta.servlet:jakarta.servlet-api:6.0.0")
    49                 val flexmarkVersion = "0.64.8"
    50                 implementation("com.vladsch.flexmark:flexmark:${flexmarkVersion}")
    51                 implementation("com.vladsch.flexmark:flexmark-util-data:${flexmarkVersion}")
    52                 implementation("com.vladsch.flexmark:flexmark-ext-tables:${flexmarkVersion}")
    53                 implementation("com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:${flexmarkVersion}")
    54                 implementation("io.github.java-diff-utils:java-diff-utils:4.12")
    55             }
    56         }
    57         val test by getting {
    58             dependencies {
    59                 implementation("org.jetbrains.kotlin:kotlin-test-junit5")
    60                 runtimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0")
    61             }
    62         }
    63     }
    64 }

mercurial