- Create a new folder
- Create a build.gradle file
- Inside the build.gradle file, put the following:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'io.ratpack:ratpack-gradle:1.4.4'
}
}
apply plugin: 'io.ratpack.ratpack-groovy'
repositories {
jcenter()
}
-
Create directory structure inside your folder:
- mkdir -p src/ratpack
-
Create a
ratpack.groovy
file inside ofsrc/ratpack
-
Put this in there:
import static ratpack.groovy.Groovy.ratpack
ratpack {
handlers {
all {
render "Hello World!"
}
}
}