Switch branches/tags
Nothing to show
Find file History
Nicky Mølholm Nicky Mølholm
Nicky Mølholm and Nicky Mølholm changed test method name
Latest commit 630addf Mar 13, 2017
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
gradle/wrapper
src
.gitignore
README.md tidied up the build script. added some README stuff Mar 8, 2017
build.gradle.kts
gradlew
gradlew.bat
settings.gradle

README.md

Spring Boot 1.5 :: Using Kotlin for the build n' code

This example shows how you can create a Spring Boot 1.5 project that is based on Kotlin 1.1 for the application code as well as the Gradle script.

Kotlin in the Code

Take a look at src/main/kotlin: You will find a super simple Spring MVC controller.

Take a look at src/test/kotlin: You will find a super simple Spring Boot integration test of the controller.

Kotlin in the Gradle build script

Kotlin as the language in Gradle is still work in progress. But it is definitely in a state where you can take it for a test spin.

Firstly, if you want up-to-date IDE support - then make sure you are using IntelliJ (update it).

Secondly, notice that this project has had a special Gradle wrapper generated. These are the steps:

  1. Source - see:

    https://github.com/gradle/gradle-script-kotlin/releases
    
  2. Locate the latest and greatest distro (those ending with -all.zip)

    https://repo.gradle.org/gradle/dist-snapshots/
    
  3. Generate a Kotlin aware Gradle wrapper

    gradle wrapper --gradle-distribution-url https://repo.gradle.org/gradle/dist-snapshots/gradle-script-kotlin-YOURVERSIONHERE-all.zip