Skip to content

Commit

Permalink
allow building for another platform with -Pplatform parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Duda committed Apr 1, 2019
1 parent 7e1d7a0 commit 738ab45
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <filename>.jar --import
java -jar <filename>.jar --gui
java -jar <filename>.jar --help
Expand All @@ -37,7 +41,7 @@ java -jar <filename>.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",
Expand Down Expand Up @@ -70,15 +74,15 @@ 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:
host: "localhost"
port: 27017
com.codingchili.core.storage.ElasticMap:
host: "localhost"
port: 27017
port: 9200
```

### Contributing
Expand Down
17 changes: 10 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 738ab45

Please sign in to comment.