From 6c36b2fa466614f737a4bf5be3a7fba67246385a Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Tue, 11 Nov 2014 23:24:46 +0100 Subject: [PATCH] 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 --- README.md | 39 ++++++++++++++++++++++++++++++++++++--- build.gradle | 17 +++++++++++++++++ 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 725ecbcc5e..491d692518 100644 --- a/README.md +++ b/README.md @@ -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--app.jar + +Pass the `--help` flag to see what options are available: + + java -jar build/libs/bitsquare--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--bootstrapNode.jar + + +See [doc/build.md](doc/build.md) for additional information. Staying in Touch diff --git a/build.gradle b/build.gradle index 8ba5d6e4ff..e9f2a32686 100644 --- a/build.gradle +++ b/build.gradle @@ -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