Skip to content

Commit f7d52ec

Browse files
committed
Add minimal documentation for Gradle
1 parent d0caed1 commit f7d52ec

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

md/gradle.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Gradle
2+
3+
Jooby is being developed with Maven and it is currently the *official* build
4+
tool. Even though it is a long-term goal of the project to accommodate alternative
5+
tooling, it is not known when such support will materialized itself. In the
6+
meantime, some compromises have to be made to walk off the beaten path.
7+
8+
The goal of this document is to document the current state of the art to
9+
duplicate a Maven development environment to Gradle.
10+
11+
## A minimal `build.gradle`
12+
13+
```
14+
/*
15+
* We are writing a standalone application.
16+
*/
17+
apply plugin: 'application'
18+
19+
/*
20+
* Some classic project configuration.
21+
*/
22+
version = 0.1
23+
mainClassName = "my.package.Main"
24+
sourceCompatibility = 1.8
25+
26+
/*
27+
* Dependencies will be downloaded from the Maven repository.
28+
*/
29+
repositories {
30+
mavenCentral()
31+
}
32+
33+
/*
34+
* A minimal project needs the framwork and a webserver.
35+
*/
36+
dependencies {
37+
compile group: 'org.jooby', name: 'jooby', version: '0.16.0'
38+
compile group: 'org.jooby', name: 'jooby-netty', version: '0.16.0'
39+
}
40+
41+
/*
42+
* We diverge from the default resources structure to adopt the Jooby standard.
43+
*/
44+
sourceSets.main.resources {
45+
srcDirs = ["conf", "public"]
46+
}
47+
```
48+
49+
## What works
50+
51+
- **Compiling the application** can be done as usual with `gradle build`.
52+
53+
- **Running the application** can be done as usual with `gradle run` but the
54+
automatic reloading of resources or java classes does not work.
55+
56+
57+
## What does not work
58+
59+
- **Everything else.**

0 commit comments

Comments
 (0)