An open API service indexing awesome lists of open source software.

https://github.com/drmaas/ratpack-kotlin

a ratpack kotlin dsl.
https://github.com/drmaas/ratpack-kotlin

kotlin ratpack rxjava rxjava2

Last synced: 5 months ago
JSON representation

a ratpack kotlin dsl.

Awesome Lists containing this project

README

          

= ratpack-kotlin

image::https://github.com/drmaas/ratpack-kotlin/actions/workflows/gradle.yml/badge.svg?event=push["build"]

image::https://forthebadge.com/images/badges/uses-badges.svg["forthebadge", https://forthebadge.com]

== Project Status

This project is in maintenance mode. PRs and issues are welcome, but my time will be limited to defect fixes and other critical maintenance as needed.

For users looking to user ratpack and kotlin together, I recommend using the outstanding library link:https://github.com/http4k/http4k[http4k] with ratpack as a link:https://www.http4k.org/guide/reference/servers/[server backend]. More details can be found link:https://github.com/http4k/http4k/blob/master/http4k-server/ratpack/src/main/kotlin/org/http4k/server/Ratpack.kt[in the server backend implementation].

== Overview

Build fluent kotlin link:https://github.com/ratpack/ratpack[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

link:https://github.com/drmaas/ratpack-kotlin-demo[View A Sample Project Here]

== Usage

* Gradle plugin (kotlin syntax)
```kotlin
plugins {
id("me.drmaas.ratpack-kotlin") version "x.y.z"
}
```
src/ratpack/ratpack.kts
```kotlin
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

```groovy
compile 'me.drmaas:ratpack-kotlin-:x.x.x'
```

Maven

```xml

me.drmaas
ratpack-kotlin-
x.x.x

```

== Local Setup

This project requires java11.

`sdk install java 11.0.15-tem`

Then:

`./gradlew check`

== Building and Releasing

```
./gradlew -Prelease.scope=patch clean build install final publishPlugins uploadArchives
```