73 lines
2.0 KiB
Groovy
73 lines
2.0 KiB
Groovy
buildscript {
|
|
ext {
|
|
kotlinVersion = '1.2.71'
|
|
springBootVersion = '2.1.4.RELEASE'
|
|
}
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
|
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
|
|
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
|
|
classpath("org.jetbrains.kotlin:kotlin-noarg:${kotlinVersion}")
|
|
}
|
|
}
|
|
|
|
apply plugin: 'kotlin'
|
|
apply plugin: 'kotlin-spring'
|
|
apply plugin: 'kotlin-jpa'
|
|
apply plugin: 'kotlin-allopen'
|
|
apply plugin: 'kotlin-kapt'
|
|
apply plugin: 'org.springframework.boot'
|
|
apply plugin: 'io.spring.dependency-management'
|
|
|
|
group = 'com.example'
|
|
version = '0.0.1-SNAPSHOT'
|
|
sourceCompatibility = 1.8
|
|
compileKotlin {
|
|
kotlinOptions {
|
|
freeCompilerArgs = ['-Xjsr305=strict']
|
|
jvmTarget = '1.8'
|
|
}
|
|
}
|
|
compileTestKotlin {
|
|
kotlinOptions {
|
|
freeCompilerArgs = ['-Xjsr305=strict']
|
|
jvmTarget = '1.8'
|
|
}
|
|
}
|
|
|
|
allOpen {
|
|
annotation('javax.persistence.Entity')
|
|
annotation('javax.persistence.Embeddable')
|
|
annotation('javax.persistence.MappedSuperclass')
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
implementation 'org.springframework.boot:spring-boot-starter-mustache'
|
|
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
|
|
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
|
|
implementation 'org.jetbrains.kotlin:kotlin-reflect'
|
|
runtimeOnly 'org.springframework.boot:spring-boot-devtools'
|
|
runtimeOnly 'com.h2database:h2'
|
|
kapt 'org.springframework.boot:spring-boot-configuration-processor'
|
|
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
|
exclude module: 'junit'
|
|
exclude module: 'mockito-core'
|
|
}
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
|
|
testImplementation 'com.ninja-squad:springmockk:1.1.0'
|
|
}
|