For Update README.md with gradle instructions.
@@ -55,6 +55,7 @@ These two web systems use Takes, and they are open source:
- [Quick Start](#quick-start)
- [Build and Run With Maven](#build-and-run-with-maven)
+- [Build and Run With Gradle](#build-and-run-with-gradle)
- [Unit Testing](#unit-testing)
- [Integration Testing](#integration-testing)
- [A Bigger Example](#a-bigger-example)
@@ -169,7 +170,7 @@ If you're using Maven, this is how your `pom.xml` should look like:
</project>
```
-With this configutation you can run it from command line:
+With this configuration you can run it from command line:
```
$ mvn clean integration-test -Phit-refresh -Dport=8080
@@ -177,6 +178,33 @@ $ mvn clean integration-test -Phit-refresh -Dport=8080
Maven will start the server and you can see it at `http://localhost:8080`.
+## Build and Run With Gradle
+
+If you're using Gradle, this is how your `build.gradle` should look like:
+
+```
+plugins {
+ id 'java'
+ id 'application'
+}
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ compile group: 'org.takes', name: 'takes', version: '1.11.3'
+}
+
+mainClassName='App'
+```
+
+With this configuration you can run it from command line:
+
+```
+$ gradle run -Phit-refresh -Dport=8080
+```
+
## Unit Testing
This is how you can unit test the app, using JUnit 4.x and
@@ -454,6 +482,16 @@ You will need this extra dependency in classpath:
</dependency>
```
+For Gradle users:
+
+```
+dependencies {
+ ...
+ runtime group: 'org.apache.velocity', name: 'velocity-engine-core', version: 'x.xx'//put the version here
+ ...
+}
+```
+
## Static Resources
Very often you need to serve static resources to your web users, like CSS
@@ -1015,6 +1053,15 @@ the `restfb` API in your project:
</dependency>
```
+For Gradle, you should add the dependencies as usual:
+
+```
+dependencies {
+ ...
+ runtime group: 'com.restfb', name: 'restfb', version: '1.15.0'
+}
+```
+
## How to contribute
Fork repository, make changes, send us a pull request. We will review
@@ -1025,9 +1072,12 @@ sending us your pull request please run full Maven build:
```
$ mvn clean install -Pqulice
```
-
To avoid build errors use maven 3.2+.
+<!-- @todo #790:30min Complete instructions for Gradle build writing -->
+<!-- instructions on how to run gradle build with all integration tests -->
+<!-- and qulice profile for static analisys. -->
+
Pay attention that our `pom.xml` inherits a lot of configuration
from [jcabi-parent](http://parent.jcabi.com).
[This article](http://www.yegor256.com/2015/02/05/jcabi-parent-maven-pom.html)
