add Hibernate to kontor-javalin
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
//id 'application'
|
||||
id 'jacoco'
|
||||
id 'test-report-aggregation'
|
||||
id 'jacoco-report-aggregation'
|
||||
alias(libs.plugins.lombok)
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -7,14 +12,92 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation libs.javalin // Pulling in Javalin
|
||||
implementation libs.javalin.bundle
|
||||
compileOnly 'org.projectlombok:lombok'
|
||||
annotationProcessor 'org.projectlombok:lombok'
|
||||
implementation libs.postgresql
|
||||
implementation libs.hibernate
|
||||
annotationProcessor libs.hibernate.modelgen
|
||||
testImplementation( platform( libs.junit.bom.get().toString() ))
|
||||
testImplementation "org.junit.jupiter:junit-jupiter"
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||
implementation libs.jackson // For JSON serialization of persons
|
||||
implementation libs.slf4j // To see some Javalin logging
|
||||
}
|
||||
|
||||
testing {
|
||||
suites {
|
||||
configureEach {
|
||||
useJUnitJupiter()
|
||||
dependencies {
|
||||
implementation project()
|
||||
implementation libs.hsqldb
|
||||
implementation libs.sqlite.jdbc
|
||||
runtimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||
}
|
||||
}
|
||||
test(JvmTestSuite) {
|
||||
targets {
|
||||
all {
|
||||
testTask.configure {
|
||||
reports {
|
||||
junitXml {
|
||||
outputPerTestCase = true // defaults to false
|
||||
mergeReruns = true // defaults to false
|
||||
}
|
||||
}
|
||||
finalizedBy(jacocoTestReport)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
integrationTest(JvmTestSuite) {
|
||||
targets {
|
||||
all {
|
||||
testTask.configure {
|
||||
shouldRunAfter(test)
|
||||
finalizedBy(jacocoTestReport)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named('check') {
|
||||
dependsOn(testing.suites.integrationTest)
|
||||
dependsOn(testing.suites.test)
|
||||
dependsOn tasks.named('testAggregateTestReport', TestReport)
|
||||
dependsOn tasks.named('integrationTestAggregateTestReport', TestReport)
|
||||
}
|
||||
|
||||
|
||||
jacocoTestReport {
|
||||
dependsOn test, integrationTest
|
||||
reports {
|
||||
xml.required = true
|
||||
csv.required = false
|
||||
}
|
||||
}
|
||||
|
||||
reporting {
|
||||
reports {
|
||||
testAggregateTestReport(AggregateTestReport) {
|
||||
}
|
||||
integrationTestAggregateTestReport(AggregateTestReport) {
|
||||
}
|
||||
integrationTestCodeCoverageReport(JacocoCoverageReport) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// application {
|
||||
// mainClass = 'de.thpeetz.kontor.api.Main'
|
||||
// }
|
||||
|
||||
task fatJar(type: Jar) {
|
||||
manifest {
|
||||
attributes 'Main-Class': 'de.thpeetz.kontor.api.Main'
|
||||
attributes 'Main-Class': 'de.thpeetz.kontor.Main'
|
||||
}
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||
@@ -22,6 +105,9 @@ task fatJar(type: Jar) {
|
||||
}
|
||||
|
||||
build.dependsOn fatJar
|
||||
// distZip.dependsOn fatJar
|
||||
// distTar.dependsOn fatJar
|
||||
// startScripts.dependsOn fatJar
|
||||
|
||||
wrapper {
|
||||
gradleVersion = "9.2.1"
|
||||
|
||||
Reference in New Issue
Block a user