mirror of
https://gitee.com/dcren/initializr.git
synced 2026-09-02 16:16:29 +08:00
Upgrade to Kotlin 1.1.1
This commit also enables Java 8 bytecode and uses kotlin-stdlib-jre7 or kotlin-stdlib-jre8 dependencies when possible. Closes gh-377
This commit is contained in:
committed by
Stephane Nicoll
parent
c6194d2357
commit
6e7ff7fb58
@@ -77,7 +77,7 @@ public class InitializrMetadataTestBuilder {
|
||||
public InitializrMetadataTestBuilder addDefaults() {
|
||||
return addDefaultTypes().addDefaultPackagings().addDefaultJavaVersions()
|
||||
.addDefaultLanguages().addDefaultBootVersions()
|
||||
.setGradleEnv("0.5.1.RELEASE").setKotlinEnv("1.0.1");
|
||||
.setGradleEnv("0.5.1.RELEASE").setKotlinEnv("1.1.1");
|
||||
}
|
||||
|
||||
public InitializrMetadataTestBuilder addDefaultTypes() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlinVersion = '1.0.1'
|
||||
kotlinVersion = '1.1.1'
|
||||
springBootVersion = '1.2.3.RELEASE'
|
||||
}
|
||||
repositories {
|
||||
@@ -22,6 +22,12 @@ apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
compileTestKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@@ -30,7 +36,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
compile('org.springframework.boot:spring-boot-starter')
|
||||
compile("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
|
||||
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
|
||||
compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
||||
testCompile('org.springframework.boot:spring-boot-starter-test')
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<kotlin.version>1.0.1</kotlin.version>
|
||||
<kotlin.version>1.1.1</kotlin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -32,7 +32,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<artifactId>kotlin-stdlib-jre8</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -64,6 +64,7 @@
|
||||
<compilerPlugins>
|
||||
<plugin>spring</plugin>
|
||||
</compilerPlugins>
|
||||
<jvmTarget>${java.version}</jvmTarget>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlinVersion = '1.0.1'
|
||||
kotlinVersion = '1.1.1'
|
||||
springBootVersion = '1.2.3.RELEASE'
|
||||
}
|
||||
repositories {
|
||||
@@ -23,6 +23,12 @@ apply plugin: 'war'
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
compileTestKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@@ -34,7 +40,7 @@ configurations {
|
||||
|
||||
dependencies {
|
||||
compile('org.springframework.boot:spring-boot-starter-web')
|
||||
compile("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
|
||||
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
|
||||
compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
||||
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
|
||||
testCompile('org.springframework.boot:spring-boot-starter-test')
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<kotlin.version>1.0.1</kotlin.version>
|
||||
<kotlin.version>1.1.1</kotlin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -32,7 +32,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<artifactId>kotlin-stdlib-jre8</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -69,6 +69,7 @@
|
||||
<compilerPlugins>
|
||||
<plugin>spring</plugin>
|
||||
</compilerPlugins>
|
||||
<jvmTarget>${java.version}</jvmTarget>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
Reference in New Issue
Block a user