jesjos
02/17/2018, 4:54 PMimport javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.GeneratedValue
@Entity
data class Todo(@Id @GeneratedValue val id: Int,
val description: String,
val completed: Boolean) {
}
buildscript {
ext {
kotlinVersion = '1.2.21'
springBootVersion = '2.0.0.RC1'
}
repositories {
mavenCentral()
maven { url "<https://repo.spring.io/snapshot>" }
maven { url "<https://repo.spring.io/milestone>" }
}
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-noarg"
apply plugin: "kotlin-jpa"
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
noArg {
annotation("javax.parstyarsersistence.Entity")
}sourceCompatibility = 1.8
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
repositories {
mavenCentral()
maven { url "<https://repo.spring.io/snapshot>" }
maven { url "<https://repo.spring.io/milestone>" }
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-hateoas')
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compile("org.jetbrains.kotlin:kotlin-reflect")
compile("com.fasterxml.jackson.module:jackson-module-kotlin")
runtime group: 'com.h2database', name: 'h2'
compile("org.springframework.boot:spring-boot-devtools")
testCompile('org.springframework.boot:spring-boot-starter-test')
}
Joaco
02/17/2018, 9:15 PMMarcelus Trojahn
02/19/2018, 1:50 PM