Upgrade to Kotlin 1.2.20

This commits upgrade to Kotlin 1.2.20 and uses the new stdlib artifact
names. As a result, 2.0  milestones prior to Spring Boot 2.0.0.RC1 are
no longer supported.

Closes gh-576
This commit is contained in:
Stephane Nicoll
2018-02-01 11:24:22 +01:00
parent 18ef480a23
commit 1d9a68d6fc
15 changed files with 18 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2017 the original author or authors. * Copyright 2012-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -557,9 +557,9 @@ public class ProjectGenerator {
return "kotlin-stdlib"; return "kotlin-stdlib";
} }
else if ("1.7".equals(javaVersion)) { else if ("1.7".equals(javaVersion)) {
return "kotlin-stdlib-jre7"; return "kotlin-stdlib-jdk7";
} }
return "kotlin-stdlib-jre8"; return "kotlin-stdlib-jdk8";
} }
private static boolean isJava8OrLater(ProjectRequest request) { private static boolean isJava8OrLater(ProjectRequest request) {

View File

@@ -31,7 +31,7 @@ repositories {
dependencies { dependencies {
compile('org.springframework.boot:spring-boot-starter') compile('org.springframework.boot:spring-boot-starter')
compile("org.jetbrains.kotlin:kotlin-stdlib-jre7:${kotlinVersion}") compile("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlinVersion}")
compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}") compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
testCompile('org.springframework.boot:spring-boot-starter-test') testCompile('org.springframework.boot:spring-boot-starter-test')
} }

View File

@@ -40,7 +40,7 @@ repositories {
dependencies { dependencies {
compile('org.springframework.boot:spring-boot-starter') compile('org.springframework.boot:spring-boot-starter')
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8") compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compile("org.jetbrains.kotlin:kotlin-reflect") compile("org.jetbrains.kotlin:kotlin-reflect")
testCompile('org.springframework.boot:spring-boot-starter-test') testCompile('org.springframework.boot:spring-boot-starter-test')
} }

View File

@@ -40,7 +40,7 @@ repositories {
dependencies { dependencies {
compile('org.springframework.boot:spring-boot-starter') compile('org.springframework.boot:spring-boot-starter')
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8") compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compile("org.jetbrains.kotlin:kotlin-reflect") compile("org.jetbrains.kotlin:kotlin-reflect")
testCompile('org.springframework.boot:spring-boot-starter-test') testCompile('org.springframework.boot:spring-boot-starter-test')
} }

View File

@@ -40,7 +40,7 @@ repositories {
dependencies { dependencies {
compile('org.springframework.boot:spring-boot-starter') compile('org.springframework.boot:spring-boot-starter')
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}") compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}") compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
testCompile('org.springframework.boot:spring-boot-starter-test') testCompile('org.springframework.boot:spring-boot-starter-test')
} }

View File

@@ -37,7 +37,7 @@ repositories {
dependencies { dependencies {
compile('org.springframework.boot:spring-boot-starter') compile('org.springframework.boot:spring-boot-starter')
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}") compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}") compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
testCompile('org.springframework.boot:spring-boot-starter-test') testCompile('org.springframework.boot:spring-boot-starter-test')
} }

View File

@@ -32,7 +32,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jetbrains.kotlin</groupId> <groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jre8</artifactId> <artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version> <version>${kotlin.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@@ -41,7 +41,7 @@ configurations {
dependencies { dependencies {
compile('org.springframework.boot:spring-boot-starter-web') compile('org.springframework.boot:spring-boot-starter-web')
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}") compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}") compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat') providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
testCompile('org.springframework.boot:spring-boot-starter-test') testCompile('org.springframework.boot:spring-boot-starter-test')

View File

@@ -32,7 +32,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jetbrains.kotlin</groupId> <groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jre8</artifactId> <artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version> <version>${kotlin.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@@ -32,7 +32,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jetbrains.kotlin</groupId> <groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jre7</artifactId> <artifactId>kotlin-stdlib-jdk7</artifactId>
<version>${kotlin.version}</version> <version>${kotlin.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@@ -32,7 +32,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jetbrains.kotlin</groupId> <groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jre8</artifactId> <artifactId>kotlin-stdlib-jdk8</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jetbrains.kotlin</groupId> <groupId>org.jetbrains.kotlin</groupId>

View File

@@ -32,7 +32,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jetbrains.kotlin</groupId> <groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jre8</artifactId> <artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version> <version>${kotlin.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@@ -32,7 +32,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jetbrains.kotlin</groupId> <groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jre8</artifactId> <artifactId>kotlin-stdlib-jdk8</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jetbrains.kotlin</groupId> <groupId>org.jetbrains.kotlin</groupId>

View File

@@ -146,7 +146,7 @@ initializr:
gradle: gradle:
dependency-management-plugin-version: 0.6.0.RELEASE dependency-management-plugin-version: 0.6.0.RELEASE
kotlin: kotlin:
default-version: 1.2.10 default-version: 1.2.20
dependencies: dependencies:
- name: Core - name: Core
content: content:

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2017 the original author or authors. * Copyright 2012-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -192,7 +192,7 @@ public class ProjectGenerationSmokeTests
projectAssert.hasBaseDir("demo").isMavenProject().isKotlinProject() projectAssert.hasBaseDir("demo").isMavenProject().isKotlinProject()
.hasStaticAndTemplatesResources(false).pomAssert().hasDependenciesCount(4) .hasStaticAndTemplatesResources(false).pomAssert().hasDependenciesCount(4)
.hasSpringBootStarterRootDependency().hasSpringBootStarterTest() .hasSpringBootStarterRootDependency().hasSpringBootStarterTest()
.hasDependency("org.jetbrains.kotlin", "kotlin-stdlib-jre8") .hasDependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
.hasDependency("org.jetbrains.kotlin", "kotlin-reflect"); .hasDependency("org.jetbrains.kotlin", "kotlin-reflect");
} }