ratpack-kotlin
Overview
Build fluent kotlin ratpack applications. Features:
-
Server, Bindings, Chain, and Handler DSL
-
RxJava extension functions
-
RxJava2 extension functions
-
Reactor extension functions
-
Coroutine functions
-
Kotlin test harnessing support:
KotlinEmbeddedApp
,kotlinApplicationUnderTest(…) and friends
Sample
Usage
-
Gradle plugin (kotlin syntax)
plugins {
id("me.drmaas.ratpack-kotlin") version "x.y.z"
}
src/ratpack/ratpack.kts
import ratpack.kotlin.handling.ratpack
ratpack {
serverConfig {
port(8080)
}
bindings {
bindInstance("string")
}
handlers {
get("test") {
render(get(String::class.java))
}
}
}
All libraries are available in maven central.
Gradle
compile 'me.drmaas:ratpack-kotlin-<module>:x.x.x'
Maven
<dependency>
<groupId>me.drmaas</groupId>
<artifactId>ratpack-kotlin-<module></artifactId>
<version>x.x.x</version>
</dependency>
Building and Releasing
./gradlew -Prelease.scope=patch clean build install final publishPlugins uploadArchives