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.
- Host: GitHub
- URL: https://github.com/drmaas/ratpack-kotlin
- Owner: drmaas
- License: apache-2.0
- Created: 2016-06-01T03:52:10.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2022-11-09T18:25:07.000Z (almost 3 years ago)
- Last Synced: 2024-05-02T22:14:47.078Z (over 1 year ago)
- Topics: kotlin, ratpack, rxjava, rxjava2
- Language: Kotlin
- Size: 961 KB
- Stars: 24
- Watchers: 5
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
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.ratpackratpack {
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
```