diff --git a/.travis.yml b/.travis.yml index ab38b3e..65c8199 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,15 @@ language: java os: - linux - - windows sudo: false dist: trusty jdk: oraclejdk11 install: true script: - "./gradlew -version" - - "./gradlew build" + - "./gradlew build -Pplatform=win" + - "./gradlew build -Pplatform=linux" + - "./gradlew build -Pplatform=mac" notifications: email: false before_cache: diff --git a/README.md b/README.md index 7a1a31e..fc93737 100644 --- a/README.md +++ b/README.md @@ -6,26 +6,30 @@ Demo video: [YouTube](https://www.youtube.com/watch?v=FFI9OnW9IuI) ![user interface](https://raw.githubusercontent.com/codingchili/ethereum-ingest/master/eth-ingest.jpg) Tested with -- ElasticSeach 6.3.1 -- MongoDB 3.4.10 -- Hazelcast 3.8.2 -- geth 1.8.12. +- ElasticSeach 7.0.0 +- MongoDB 4.0.8 +- Hazelcast 3.10.5 +- geth 1.8.23 ### Building Build with -``` -./gradlew jar +```console +# detects the current platform. +./gradlew build + +# to build for a specific platform, 'win', 'mac' or 'linux'. +./gradlew build -Pplatform=linux ``` Requires chili-core through jitpack or local repo. ### Importing The first step is to start your ethereum IPC client, for geth use: -``` +```console geth --rpcapi personal,db,eth,net,web3 --rpc --testnet ``` Start the importer with: -``` +```console java -jar .jar --import java -jar .jar --gui java -jar .jar --help @@ -37,7 +41,7 @@ java -jar .jar --help Set configuration in application.json before running --import. WHen using the graphical application the configuration is saved automatically. Default configuration -``` +```console { "startBlock" : "1964770", "blockEnd" : "1964900", @@ -70,7 +74,7 @@ Imports can be executed multiple times over the same block range without resulti To configure a custom host:port for MongoDB or ElasticSearch please add/edit this file in "conf/system/storage.yaml" -``` +```console --- storage: com.codingchili.core.storage.MongoDBMap: @@ -78,7 +82,7 @@ storage: port: 27017 com.codingchili.core.storage.ElasticMap: host: "localhost" - port: 27017 + port: 9200 ``` ### Contributing diff --git a/build.gradle b/build.gradle index 7ac014d..ab9d557 100644 --- a/build.gradle +++ b/build.gradle @@ -20,13 +20,16 @@ repositories { // https://stackoverflow.com/a/52615808 def currentOS = org.gradle.internal.os.OperatingSystem.current() -def platform -if (currentOS.isWindows()) { - platform = 'win' -} else if (currentOS.isLinux()) { - platform = 'linux' -} else if (currentOS.isMacOsX()) { - platform = 'mac' +def platform = project.platform + +if (!platform) { + if (currentOS.isWindows()) { + platform = 'win' + } else if (currentOS.isLinux()) { + platform = 'linux' + } else if (currentOS.isMacOsX()) { + platform = 'mac' + } } dependencies {