Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 996 Bytes

README.adoc

File metadata and controls

20 lines (12 loc) · 996 Bytes

Creating Ratpack projects with Lazybones and running them with Gradle (10 minutes)

Lazybones is a scaffolding tool to generate application skeletons for different projects, and it’s the recommended option for bootstrapping a Ratpack application.

Let’s create a Ratpack project in the current directory:

lazybones create ratpack .

After that, you can run the application with Gradle:

./gradlew run

Examining the project layout (5 minutes)

Once you have created the app, let’s have a look at it’s content:

  • build.gradle is the main Gradle build file.

  • src/main/groovy is the package root for your Groovy classes (as in all Gradle/Maven applications).

  • src/ratpack contains Ratpack specific artifacts. The most important one is Ratpack.groovy which contains the Ratpack DSL. If you take a look at it, you will find it similar to the script we created in the previous exercise.

  • src/test/groovy will contain your Spock tests.