Commit ee6a96d4 authored by Christian Meyer's avatar Christian Meyer
Browse files

Added README.md

parent c3dced50
Gradle build scripts developed in zmt-bremen's department of Theoretical Ecology & Modelling. For more information about Gradle visit https://gradle.org/.
# General
## IDE Support
To generate .project and .classpath files for developing in the Eclipse IDE enter:
```shell
./gradlew eclipse
```
This will also generate a launch configuration for simulations to run them via GUI.
### Eclipse Support for Gradle
Gradle is supported by Eclipse via Buildship:
https://github.com/eclipse/buildship/
## Versioning
Versioning is done by tagging via git. The current version name is generated from the last git tag. If the current version is not tagged, a short version of the commit hash is added.
## Credentials
You can store your credentials for the dochost server in encrypted form:
```shell
./gradlew addCredentials --key dochostUser --value <username>
./gradlew addCredentials --key dochostPw --value <password>
```
Credentials are stored in `~/.gradle/gradle.encrypted.properties`. This will save you from entering them every time you want to publish or deploy.
For more information about the credentials plugin visit https://github.com/etiennestuder/gradle-credentials-plugin.
## Maven Repository
There is a maven repository on the dochost server within the `maven2/` subdirectory. Libraries are stored there and fetched by Gradle when they are required. See the entry about publishing for more info.
## Javadoc
Javadoc files of the current project can be build and stored on dochost's `javadoc/` subdirectory:
```
./gradlew deployJavadoc
```
Only the recent version is stored and outdated files will be overwritten.
# Simulations
To make your simulation build with the zmt-build add the following to your `build.gradle` file:
```groovy
buildscript {
repositories {
maven {
url "http://dochost.intra.zmt/maven2/"
}
}
dependencies {
classpath 'de.zmt:zmt-build:1+'
}
}
apply plugin: 'de.zmt.simulation'
```
## Distribution
You can build a distribution by running the following in the project root directory:
```shell
./gradlew installDist
```
Build files are then stored in the build subdirectory. The file name of the distribution is generated from the project name and the current version. A CHANGES file will be generated containing all git tags with their messages.
## Deployment
Distributions can be uploaded to the `dist/` subdirectory on 'dochost' server:
```shell
./gradlew deployZip
```
# Libraries
To make your simulation build with the zmt-build add the following to your `build.gradle` file:
```groovy
buildscript {
repositories {
maven {
url "http://dochost.intra.zmt/maven2/"
}
}
dependencies {
classpath 'de.zmt:zmt-build:1+'
}
}
apply plugin: 'de.zmt.library'
```
## Publishing
Libraries can be published to dochost:
```
./gradlew publish
```
After that, they will be accessible by Gradle when required.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment