You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.1 KiB

plugins {
id('groovy')
id('application')
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
version = "1.0.2"
description = "Example of using jpa for a hostpital."
application {
mainClassName = 'space.kklochko.jpa_hospital_example.Main'
}
shadowJar {
mergeServiceFiles()
minimize()
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
compileJava {
options.encoding = 'UTF-8'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
repositories {
// Spock releases are available from Maven Central
mavenCentral()
// Spock snapshots are available from the Sonatype OSS snapshot repository
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
implementation 'org.hibernate.orm:hibernate-core:6.3.0.Final'
compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
testCompileOnly 'org.projectlombok:lombok:1.18.30'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.30'
implementation 'org.postgresql:postgresql:42.6.0'
implementation 'io.github.cdimascio:dotenv-java:3.0.0'
// mandatory dependencies for using Spock
implementation platform('org.apache.groovy:groovy-bom:4.0.15')
implementation 'org.apache.groovy:groovy'
testImplementation platform("org.spockframework:spock-bom:2.3-groovy-4.0")
testImplementation "org.spockframework:spock-core"
testImplementation "org.spockframework:spock-junit4" // you can remove this if your code does not rely on old JUnit 4 rules
// optional dependencies for using Spock
testImplementation "org.hamcrest:hamcrest-core:2.2" // only necessary if Hamcrest matchers are used
testRuntimeOnly 'net.bytebuddy:byte-buddy:1.14.8' // allows mocking of classes (in addition to interfaces)
testRuntimeOnly "org.objenesis:objenesis:3.3" // allows mocking of classes without default constructor (together with ByteBuddy or CGLIB)
// testing dependencies for sql
implementation "org.apache.groovy:groovy-sql"
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}