Skip to content

Commit

Permalink
Merge pull request #102 from alkum/add-seed-gradle-run
Browse files Browse the repository at this point in the history
Add :seed:run gradle task
  • Loading branch information
chimp1984 authored Feb 18, 2022
2 parents bab7c4e + fb30c81 commit 8ea48f4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 6 deletions.
41 changes: 35 additions & 6 deletions docs/sample-run-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,47 @@ Copy the `Alice_clear` run configuration, rename it to `Alice_i2p` and change:

### Command line: Gradle run configs

Start a default desktop client with:
Start a seed with:

```
# Using default settings
./gradlew seed:run
```

For example, to start two local seeds, `bisq2_seed1` and `bisq2_seed2`, reachable on clearnet:

```
# Seed 1
./gradlew seed:run \
-Dbisq.application.appName=bisq2_seed1 \
-Dbisq.networkServiceConfig.defaultNodePortByTransportType.clear=8000 \
-Dbisq.networkServiceConfig.supportedTransportTypes.0=CLEAR \
-Dbisq.networkServiceConfig.seedAddressByTransportType.clear.0=127.0.0.1:8000 \
-Dbisq.networkServiceConfig.seedAddressByTransportType.clear.1=127.0.0.1:8001
# Seed 2
./gradlew seed:run \
-Dbisq.application.appName=bisq2_seed2 \
-Dbisq.networkServiceConfig.defaultNodePortByTransportType.clear=8001 \
-Dbisq.networkServiceConfig.supportedTransportTypes.0=CLEAR \
-Dbisq.networkServiceConfig.seedAddressByTransportType.clear.0=127.0.0.1:8000 \
-Dbisq.networkServiceConfig.seedAddressByTransportType.clear.1=127.0.0.1:8001
```

Start a desktop client with:

```
# Using default settings
./gradlew desktop:run
```

Start a customized desktop client with:
To start a custom desktop client connecting only to clearnet:

```
# Local client on clearnet only
./gradlew desktop:run \
-Dbisq.application.appName=bisq_Alice_i2p \
-Dbisq.networkServiceConfig.supportedTransportTypes.0=I2P \
-Dbisq.networkServiceConfig.seedAddressByTransportType.i2p.0=<i2p destination of seed 1>:5000 \
-Dbisq.networkServiceConfig.seedAddressByTransportType.i2p.1=<i2p destination of seed 2>:5001
-Dbisq.application.appName=bisq_Alice_clear \
-Dbisq.networkServiceConfig.supportedTransportTypes.0=CLEAR \
-Dbisq.networkServiceConfig.seedAddressByTransportType.clear.0=127.0.0.1:8000 \
-Dbisq.networkServiceConfig.seedAddressByTransportType.clear.1=127.0.0.1:8001
```
12 changes: 12 additions & 0 deletions seed/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'java-library'
id 'application'
}

repositories {
Expand All @@ -12,6 +13,17 @@ apply from: '../buildSrc/logging-dependencies.gradle'
apply from: '../buildSrc/test-dependencies.gradle'
apply from: '../buildSrc/lombok-dependencies.gradle'

application {
project.mainClassName = 'bisq.seed.SeedMain'
}

run {
// Pass command-line properties to application
// Normally they'd only be applied to the gradle process, but we need them in the started application
// See https://stackoverflow.com/a/23689696
systemProperties System.getProperties()
}

dependencies {
api platform(project(':platforms:common-platform'))

Expand Down

0 comments on commit 8ea48f4

Please sign in to comment.