mirror of
https://github.com/ethauvin/rife2-hello.git
synced 2025-04-25 15:37:10 -07:00
69 lines
1.4 KiB
Kotlin
69 lines
1.4 KiB
Kotlin
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
|
import com.uwyn.rife2.gradle.TemplateType.*
|
|
|
|
plugins {
|
|
application
|
|
id("com.uwyn.rife2")
|
|
`maven-publish`
|
|
}
|
|
|
|
base {
|
|
archivesName.set("hello")
|
|
version = 1.0
|
|
group = "com.example"
|
|
}
|
|
|
|
application {
|
|
mainClass.set("hello.App")
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(17))
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
// Use Maven Central for resolving dependencies.
|
|
mavenCentral()
|
|
maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots") } // only needed for SNAPSHOT
|
|
}
|
|
|
|
rife2 {
|
|
version.set("1.4.0")
|
|
useAgent.set(true)
|
|
precompiledTemplateTypes.add(HTML)
|
|
}
|
|
|
|
dependencies {
|
|
runtimeOnly(libs.bundles.jetty)
|
|
runtimeOnly(libs.slf4j.simple)
|
|
|
|
testImplementation(libs.jsoup)
|
|
testImplementation(libs.junit.jupiter)
|
|
}
|
|
|
|
tasks {
|
|
test {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
exceptionFormat = TestExceptionFormat.FULL
|
|
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
|
}
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
name = "Build"
|
|
url = uri(rootProject.layout.buildDirectory.dir("repo"))
|
|
}
|
|
}
|
|
publications {
|
|
create<MavenPublication>("maven") {
|
|
from(components["java"])
|
|
}
|
|
}
|
|
}
|