From 75443aaa132be4123dc62ae71e87ef3ab2550356 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Sat, 27 Dec 2014 01:15:01 +0100 Subject: [PATCH] Support running ethereumj-studio as executable jar See updated ethereumj-studio/README.md for details. Note that this commit removes the `build-post-package.xml` ant file (for now) to simplify the Gradle arrangement. This functionality can be re-introduced later and more simply using Gradle's native DSL. In the meantime, both the -core and -studio projects can be run using `gradle run` or run as executable jars by running `gradle shadowJar` followed by the usual `java -jar` execution of the resulting `-all` jar file found in each project's respective `build/libs` directory. --- build.gradle | 4 ++ ethereumj-core/README.md | 8 ++-- ethereumj-core/build.gradle | 1 - ethereumj-studio/README.md | 15 ++++--- ethereumj-studio/build-post-package.xml | 54 ------------------------- ethereumj-studio/build.gradle | 7 ++++ 6 files changed, 22 insertions(+), 67 deletions(-) delete mode 100644 ethereumj-studio/build-post-package.xml diff --git a/build.gradle b/build.gradle index b2516b90..de4fabb1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,9 @@ wrapper.gradleVersion = '2.2.1' +allprojects { + apply plugin: 'eclipse' +} + subprojects { apply plugin: 'java' diff --git a/ethereumj-core/README.md b/ethereumj-core/README.md index f713e423..1d534aff 100644 --- a/ethereumj-core/README.md +++ b/ethereumj-core/README.md @@ -16,15 +16,15 @@ See [ethereumj-studio](../ethereumj-studio). #### Compile, test and package -Run `./gradlew build`. +Run `../gradlew build`. - find jar artifacts at `build/libs` - find unit test and code coverage reports at `build/reports` #### Run an ethereum node - - run `./gradlew run`, or - - build a standalone executable jar with `./gradlew shadow` and execute the `-all` jar in `build/libs` using `java -jar [jarfile]`. + - run `../gradlew run`, or + - build a standalone executable jar with `../gradlew shadow` and execute the `-all` jar in `build/libs` using `java -jar [jarfile]`. #### Import sources into IntelliJ IDEA @@ -34,7 +34,7 @@ Note that in order to build the project without errors in IDEA, you will need to #### Install artifacts into your local `~/.m2` repository -Run `./gradlew install`. +Run `../gradlew install`. #### Publish ethereumj-core builds diff --git a/ethereumj-core/build.gradle b/ethereumj-core/build.gradle index 400d85f8..eb7cc449 100644 --- a/ethereumj-core/build.gradle +++ b/ethereumj-core/build.gradle @@ -1,6 +1,5 @@ plugins { id 'application' - id 'eclipse' id 'jacoco' id 'maven' id 'com.github.johnrengelman.shadow' version '1.2.0' diff --git a/ethereumj-studio/README.md b/ethereumj-studio/README.md index 8ac1bd2b..e633fb9e 100644 --- a/ethereumj-studio/README.md +++ b/ethereumj-studio/README.md @@ -1,12 +1,11 @@ -###### :small_blue_diamond: Build instructions (maven) - 1. build_1: [a full application package] : ~> ` mvn clean package ` +## ethereum-studio +To run the ethereumj-studio GUI: + + - run `../gradlew run`, or + - run `../gradlew shadowJar`, followed by `java -jar build/libs/ethereumj-studio-*-all.jar` + +See ethereumj-studio in action here: -. -. -. [![ScreenShot](http://i.imgur.com/FQiBihl.jpg)](https://www.youtube.com/watch?v=D5ok7jh7AOg) -. -. -. diff --git a/ethereumj-studio/build-post-package.xml b/ethereumj-studio/build-post-package.xml deleted file mode 100644 index 675515e7..00000000 --- a/ethereumj-studio/build-post-package.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - Build file to package the EthereumJ client and dependencies into a zip-file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ethereumj-studio/build.gradle b/ethereumj-studio/build.gradle index 9e451c1d..4980d290 100644 --- a/ethereumj-studio/build.gradle +++ b/ethereumj-studio/build.gradle @@ -1,3 +1,10 @@ +plugins { + id 'application' + id 'com.github.johnrengelman.shadow' version '1.2.0' +} + +mainClassName = 'org.ethereum.gui.ToolBar' + dependencies { compile project(':ethereumj-core') compile "com.maxmind.geoip:geoip-api:1.2.11"