Introduction Tests are important for software development to ensure qualitz and maintainability. Tests in Kotlin can be done in a very similiar way as in Java. The basic concepts like unittests, integrationtests, mocking, dependency injection, etc can also be applied to Kotlin code. I will use the framework JUnit 5 throughout this tutorial. It is the Java test framework and fully compatible with Kotlin. The first test Kotlin can use the same Annotations Java uses so our first test looks pretty similiar:
Motivation I recently started a project for making migrations for Keycloak possible in a liquibase-like style. To be able to invoke this migrations from gradle I had to write a gradle plugin. I didn’t find a good ressource how to do so, so I decided to make a quick write up. Basics Gradle is a build automation tool from the java ecosystem. It has a lot of plugins for various use cases.
In this post I want to introduce the Jobby microframework for Kotlin and Java. They don’t have a nice getting started site yet so I decided to make a quick write up. We will write a small rest service in Kotlin for managing persons. This web service is going to take up under 30 lines of code. Starting up We will use Gradle to build our rest application. mkdir kotlin_jooby cd kotlin_jooby gradle init --dsl kotlin build.