Add 'appJar' and 'bootstapNodeJar' tasks to build

The build now exposes two explicit ShadowJar tasks: one for the main
JavaFX client (`appJar`) and one for the headless bootstrap node
(`bootstrapNodeJar`).

Run as follows:

    ./gradlew appJar
    -- or --
    ./gradlew bootstrapNodeJar

The resulting executable jar for each will be found in the `build/libs`
directory.

Thanks to @johnrengleman for his help at johnrengelman/shadow#108

Resolves #265
Resolves #252
This commit is contained in:
Chris Beams 2014-11-11 23:24:46 +01:00
parent 69ed19d3dc
commit 6c36b2fa46
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73
2 changed files with 53 additions and 3 deletions

View File

@ -18,13 +18,46 @@ Because the fiat money portion of any trade must be transferred via traditional
You can read about all of this and more in the [overview](https://bitsquare.io/overview.png),
[whitepaper](https://bitsquare.io/whitepaper.pdf), [arbitration](https://bitsquare.io/arbitration_system.pdf) and [risk analysis](https://bitsquare.io/risk_analysis.pdf) documents. Several [screencasts](https://www.youtube.com/playlist?list=PLXvC3iNe_di9bL1A5xyAKI2PzNg8jU092) are available as well.
Status
------
Pre-alpha and under heavy development.
The [team](https://github.com/orgs/bitsquare/people) is currently working on a series of pre-releases on the way to version 1.0. See the [roadmap](https://github.com/bitsquare/bitsquare/wiki/Roadmap) for details.
Building from source
--------------------
**Alpha testers welcome!** Please see the [instructions for alpha testing](https://github.com/bitsquare/bitsquare/wiki/Alpha-Testing), where you'll find detailed information about downloading and using our native installers, [building from source](doc/build.md) and more.
1. Install the latest JDK (8u20 or better)
2. Clone this repository
3. **Build and launch the Bitsquare JavaFX client** by running:
```
./gradlew run
```
Pass command line arguments to the app via the Gradle `-Pargs` property as follows:
./gradlew run -Pargs="--help"
Or, **build an executable jar** with the `appJar` task:
./gradlew appJar
Run the app as follows:
java -jar build/libs/bitsquare-<version>-app.jar
Pass the `--help` flag to see what options are available:
java -jar build/libs/bitsquare-<version>-app.jar --help
To **build a headless bootstrap node jar**, run the `bootstrapNodeJar` task:
./gradlew bootstrapNodeJar
Run the bootstrap node:
java -jar build/libs/bitsquare-<version>-bootstrapNode.jar
See [doc/build.md](doc/build.md) for additional information.
Staying in Touch

View File

@ -73,6 +73,23 @@ task packageNative(type: Exec, dependsOn: shadowJar) {
args project.version, shadowJar.archivePath, mainClassName
}
shadowJar.classifier = 'app'
task appJar(dependsOn: shadowJar) {
group = "shadow"
description = "Builds a Bitsquare client UI executable jar"
}
task bootstrapNodeJar(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
group = "shadow"
description = "Builds a Bitsquare bootstrap node executable jar"
manifest.attributes 'Main-Class': 'io.bitsquare.app.cli.BootstrapNodeMain'
classifier = 'bootstrapNode'
from(project.convention.getPlugin(JavaPluginConvention).sourceSets.main.output)
configurations = [project.configurations.runtime]
exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA')
}
jacocoTestReport {
reports {
xml.enabled = true