Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add :seed:run gradle task #102

Merged
merged 2 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions docs/sample-run-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,52 @@ 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 all 3 networks:

```
# Seed 1
./gradlew seed:run \
-Dbisq.application.appName=bisq2_seed1 \
-Dbisq.networkServiceConfig.defaultNodePortByTransportType.clear=8000 \
-Dbisq.networkServiceConfig.defaultNodePortByTransportType.tor=1000 \
-Dbisq.networkServiceConfig.defaultNodePortByTransportType.i2p=5000 \
-Dbisq.networkServiceConfig.supportedTransportTypes.0=TOR \
-Dbisq.networkServiceConfig.supportedTransportTypes.1=I2P \
-Dbisq.networkServiceConfig.supportedTransportTypes.2=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.defaultNodePortByTransportType.tor=1001 \
-Dbisq.networkServiceConfig.defaultNodePortByTransportType.i2p=5001 \
-Dbisq.networkServiceConfig.supportedTransportTypes.0=TOR \
-Dbisq.networkServiceConfig.supportedTransportTypes.1=I2P \
-Dbisq.networkServiceConfig.supportedTransportTypes.2=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 I2P:

```
# Local client on I2P only
./gradlew desktop:run \
-Dbisq.application.appName=bisq_Alice_i2p \
-Dbisq.networkServiceConfig.supportedTransportTypes.0=I2P \
Expand Down
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