85 lines
2.2 KiB
Groovy
85 lines
2.2 KiB
Groovy
plugins {
|
|
id 'org.springframework.boot' version '2.4.1'
|
|
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
|
|
id 'java'
|
|
|
|
// https://github.com/ben-manes/gradle-versions-plugin
|
|
id "com.github.ben-manes.versions" version "0.36.0"
|
|
|
|
// Use Kotlin in Spring testing.
|
|
id 'org.jetbrains.kotlin.jvm' version '1.4.30-M1'
|
|
}
|
|
|
|
group = 'org.hydev'
|
|
version = '0.0.1-SNAPSHOT'
|
|
sourceCompatibility = '11'
|
|
|
|
configurations {
|
|
compileOnly {
|
|
extendsFrom annotationProcessor
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
|
|
}
|
|
|
|
dependencies {
|
|
// Spring Web
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
|
|
// Lombok
|
|
compileOnly 'org.projectlombok:lombok'
|
|
annotationProcessor 'org.projectlombok:lombok'
|
|
|
|
// https://my.oschina.net/mingyuelab/blog/3190313
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
implementation('org.xerial:sqlite-jdbc:3.34.0')
|
|
implementation('com.github.gwenn:sqlite-dialect:0.1.1')
|
|
|
|
// https://www.baeldung.com/java-bean-validation-not-null-empty-blank
|
|
implementation('org.hibernate:hibernate-validator:7.0.0.Final')
|
|
|
|
// If I need @Slf4J (Lombok) in testing.
|
|
// testCompileOnly('org.projectlombok:lombok')
|
|
// testAnnotationProcessor('org.projectlombok:lombok')
|
|
|
|
// Try to use Jackson...?
|
|
// implementation "com.google.code.gson:gson:2.8.6"
|
|
|
|
// Using Kotlin in testing.
|
|
testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
|
|
|
// About the warning in Slf4J, Add jackson Kotlin support.
|
|
// implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
|
|
|
// Spring Security.
|
|
// implementation 'org.springframework.boot:spring-boot-starter-security'
|
|
|
|
// Kotlin support
|
|
implementation "org.jetbrains.kotlin:kotlin-reflect:1.4.21"
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
}
|
|
|
|
// Remove version number from jar name for deployment
|
|
bootJar {
|
|
archiveFileName = "${archiveBaseName.get()}.${archiveExtension.get()}"
|
|
}
|