Jacol
01/24/2018, 11:46 AMOutdated Kotlin Runtime
Your version of Kotlin runtime in 'Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.1.61' library is 1.1.61-release-68 (1.1.61), while plugin version is 1.2.20-release-IJ2017.3-1.
Runtime library should be updated to avoid compatibility problems.
but this running 🙂Czar
01/24/2018, 11:46 AMext["kotlin.version"] = kotlinVersion
after buildScriptCzar
01/24/2018, 11:46 AMJacol
01/24/2018, 11:56 AMbuildscript {
ext {
kotlinVersion = '1.2.20'
springBootVersion = '2.0.0.M7'
}
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}")
}
}
ext["kotlin.version"] = '1.2.20'
Jacol
01/24/2018, 11:56 AMCzar
01/24/2018, 11:57 AMkotlinVersion
in ext, you can write ext["kotlin.version"] = kotlinVersion
to reuse the same one as defined in buildscript
2) How do you mean? This should've gotten rid of 1.1.61 version problem in intellij.Jacol
01/24/2018, 12:22 PMbuildscript {
ext {
kotlinVersion = '1.2.10'
springBootVersion = '2.0.0.M7'
}
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}")
}
}
ext["kotlin.version"] = kotlinVersion
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'pl.app'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.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-web')
compile('org.springframework.boot:spring-boot-starter-webflux')
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8"){
exclude(group:"org.jetbrains.kotlin",module:"kotlin-stdlib-jre7")
}
compile("org.jetbrains.kotlin:kotlin-reflect")
runtime('com.h2database:h2')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('io.projectreactor:reactor-test')
}
sdeleuze
01/24/2018, 3:48 PM