- Follow JB Nizet JPA guidelines - Use Mockk and SpringMockK - Document Maven configuration in addition to Gradle one - Leverage CrudRepository.findIdOrNull extension - Upgrade to Spring Boot 2.1.3 - Various refactoring and improvements Closes gh-22 Closes gh-23
70 lines
1.8 KiB
Groovy
70 lines
1.8 KiB
Groovy
buildscript {
|
|
ext {
|
|
kotlinVersion = '1.2.71'
|
|
springBootVersion = '2.1.3.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')
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
dependencies {
|
|
compile('org.springframework.boot:spring-boot-starter-data-jpa')
|
|
compile('org.springframework.boot:spring-boot-starter-web')
|
|
compile('org.springframework.boot:spring-boot-starter-mustache')
|
|
compile('com.fasterxml.jackson.module:jackson-module-kotlin')
|
|
compile('org.jetbrains.kotlin:kotlin-stdlib-jdk8')
|
|
compile('org.jetbrains.kotlin:kotlin-reflect')
|
|
runtime('com.h2database:h2')
|
|
kapt('org.springframework.boot:spring-boot-configuration-processor')
|
|
testCompile('org.springframework.boot:spring-boot-starter-test') {
|
|
exclude module: 'junit'
|
|
exclude module: 'mockito-core'
|
|
}
|
|
testImplementation('org.junit.jupiter:junit-jupiter-api')
|
|
testImplementation('com.ninja-squad:springmockk:1.1.0')
|
|
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine')
|
|
}
|