build.gradle.kts

Wed, 07 Aug 2024 18:43:15 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 07 Aug 2024 18:43:15 +0200
changeset 321
fe73f02d86dc
parent 302
a27af2669825
permissions
-rw-r--r--

fix regression for issue #404

where a partially loaded project
object was insufficient to render
the issue view

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
    kotlin("jvm") version "2.0.0"
    war
}
group = "de.uapcore"
version = "1.3.0"

repositories {
    mavenCentral()
}

tasks.withType<JavaCompile>().configureEach {
    targetCompatibility = "21"
}

tasks.test {
    useJUnitPlatform()
}

tasks.jar {
    enabled = false
}

tasks.war {
    duplicatesStrategy = DuplicatesStrategy.WARN
    archiveFileName.set("lightpit.war")
    from("src/main/resources")
}

val libsAreProvided = true
kotlin {
    compilerOptions {
        jvmTarget.set(JvmTarget.JVM_21)
    }

    sourceSets {
        val main by getting {
            dependencies {
                arrayOf(
                    "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.0",
                    "org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1",
                    "org.postgresql:postgresql:42.7.3"
                ).forEach {
                    if (libsAreProvided) compileOnly(it) else implementation(it)
                }
                compileOnly("jakarta.servlet:jakarta.servlet-api:6.0.0")
                val flexmarkVersion = "0.64.8"
                implementation("com.vladsch.flexmark:flexmark:${flexmarkVersion}")
                implementation("com.vladsch.flexmark:flexmark-util-data:${flexmarkVersion}")
                implementation("com.vladsch.flexmark:flexmark-ext-tables:${flexmarkVersion}")
                implementation("com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:${flexmarkVersion}")
                implementation("io.github.java-diff-utils:java-diff-utils:4.12")
            }
        }
        val test by getting {
            dependencies {
                implementation("org.jetbrains.kotlin:kotlin-test-junit5")
                runtimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.3")
            }
        }
    }
}

mercurial