sdeleuze
01/18/2018, 9:02 AMsdeleuze
01/18/2018, 9:03 AMlex
01/18/2018, 9:13 AM...
buildscript {
repositories {
maven("<https://repo.spring.io/milestone>")
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.0.M7")
}
}
apply {
plugin("org.springframework.boot")
}
plugins {
val kotlinVersion = "1.2.20"
kotlin("jvm") version kotlinVersion
kotlin("plugin.spring") version kotlinVersion
kotlin("plugin.jpa") version kotlinVersion
id("io.spring.dependency-management") version "1.0.4.RELEASE"
}
...
repositories {
mavenCentral()
jcenter()
maven("<https://repo.spring.io/milestone>")
}
dependencies {
compile(kotlin("stdlib-jdk8"))
compile(kotlin("stdlib"))
compile(kotlin("stdlib-jre7"))
compile(kotlin("stdlib-jre8"))
compile(kotlin("reflect"))
...
}
without explicit declaration
compile(kotlin("stdlib"))
compile(kotlin("stdlib-jre7"))
it will be at 1.1.61 versionsdeleuze
01/18/2018, 9:17 AMkotlin-stdlib-jdk7
and kotlin-stdlib-jdk8
versions but that will be the case for RC1.lex
01/18/2018, 9:21 AMlex
01/18/2018, 9:22 AMbuildscript {
ext {
val kotlinVersion = "1.2.20"
}
repositories {
maven("<https://repo.spring.io/milestone>")
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.0.M7")
}
}
apply {
plugin("org.springframework.boot")
}
plugins {
kotlin("jvm")// version kotlinVersion
kotlin("plugin.spring")// version kotlinVersion
kotlin("plugin.jpa")// version kotlinVersion
id("io.spring.dependency-management") version "1.0.4.RELEASE"
}
lex
01/18/2018, 9:22 AMbuild.gradle.kts:9:5: Unresolved reference: ext
lex
01/18/2018, 9:23 AMsdeleuze
01/18/2018, 9:23 AMsdeleuze
01/18/2018, 9:24 AMlex
01/18/2018, 9:24 AMlex
01/18/2018, 9:24 AMsdeleuze
01/18/2018, 9:25 AMsdeleuze
01/18/2018, 9:25 AMlex
01/18/2018, 9:27 AMlex
01/18/2018, 9:28 AMimage.png▾
sdeleuze
01/18/2018, 9:28 AMsdeleuze
01/18/2018, 10:47 AMsdeleuze
01/18/2018, 10:47 AMplugins {
val kotlinVersion = "1.2.20"
id("org.jetbrains.kotlin.jvm") version kotlinVersion
id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion
id("org.springframework.boot") version "2.0.0.M7"
id("io.spring.dependency-management") version "1.0.4.RELEASE"
}
extra["kotlin.version"] = plugins.getPlugin(KotlinPluginWrapper::class.java).kotlinPluginVersion
sdeleuze
01/18/2018, 10:48 AMlex
01/18/2018, 10:50 AMlex
01/18/2018, 10:50 AMlex
01/18/2018, 10:51 AMCzar
01/18/2018, 11:24 AMkotlin.version
.
This does not allow us to use val kotlinVersion by extra
syntax in the build.gradle.kts
we have to always use extra["kotlin.version"]
instead 😞dharrigan
01/18/2018, 11:29 AMfabricio
01/20/2018, 4:37 PM@Document(collection = "schedules")
data class ScheduleDocument(val payload: Payload) {
}
is stored as:
{
"_id" : ObjectId("5a636f2e5017622fc0c4654a"),
"_class" : "example.Payload",
"channel" : "push",
"schedule" : ISODate("2018-01-20T16:32:46.535Z")
}
But I was expecting payload
to be a subdocument, like this:
{
"_id" : ObjectId("5a636f2e5017622fc0c4654a"),
"_class" : "example.ScheduleDocument",
"payload": {
"channel" : "push",
"schedule" : ISODate("2018-01-20T16:32:46.535Z")
}
}
can anyone explain this behavior?sdeleuze
01/22/2018, 8:53 AMziggy42
01/22/2018, 5:09 PM@Query
annotations when using Kotlin?ziggy42
01/22/2018, 5:13 PMCzar
01/22/2018, 5:51 PM