Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
git submodule update --init --recursive
git submodule update --recursive --remote

- name: Set up JDK 17
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '25'
distribution: 'zulu'

- name: Setup Gradle
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
.idea
build
lib
bisq-relay
bisq-relay.bat
/*.json
/*.txt
/*.p12
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

53 changes: 19 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,13 @@ More documentation can be found [here](https://github.com/bisq-network/bisqremot

## Building the Source Code

### Clone the Repository

This repository has a dependency on git submodules [bisq](https://github.com/bisq-network/bisq)
and [bisq-gradle](https://github.com/bisq-network/bisq-gradle).
There are two ways to clone it before it can be built:

1. Use the --recursive option in the clone command:
```sh
git clone --recursive https://github.com/bisq-network/bisq-relay.git
```

2. Do a normal clone and pull down the bisq repo dependency with two git submodule commands:
```sh
git clone https://github.com/bisq-network/bisq-relay.git
cd bisq-relay
git submodule init
git submodule update
```

### Build the Project

```sh
./gradlew clean build
Build the project using the `installDist` Gradle task, which creates a local runnable distribution under
`build/install/` and generates the startup script used to run the service.

```shell
./gradlew clean installDist
```

## Running the Service
Expand Down Expand Up @@ -62,7 +46,7 @@ corresponding password stored within a `apnsCertificatePassword.txt` file.

> Note, the APNs certificate needs to be manually renewed every year.

In order to obtain the APNs certificate, the following will need to be done on macOS:
To get the APNs certificate, the following will need to be done on macOS:
1. Create and download a cer file from https://developer.apple.com/account/ios/certificate/?teamId=XXXXXX
2. Add the *.cer file to your keychain.
3. In keychain, go to "My certificates". Expand the Apple Push Service certificate and select both lines.
Expand All @@ -74,12 +58,12 @@ The service is configured via environment variables. The following variables are

#### APNs Configuration

| Environment Variable | Description | Default |
|---------------------|-------------|---------|
| `BISQ_RELAY_APNS_BUNDLE_ID` | iOS app bundle identifier (required) | _(none)_ |
| `BISQ_RELAY_APNS_CERTIFICATE_FILE` | Path to .p12 certificate file (required) | _(none)_ |
| Environment Variable | Description | Default |
|---------------------------------------------|----------------------------------------------|----------|
| `BISQ_RELAY_APNS_BUNDLE_ID` | iOS app bundle identifier (required) | _(none)_ |
| `BISQ_RELAY_APNS_CERTIFICATE_FILE` | Path to .p12 certificate file (required) | _(none)_ |
| `BISQ_RELAY_APNS_CERTIFICATE_PASSWORD_FILE` | Path to certificate password file (required) | _(none)_ |
| `BISQ_RELAY_APNS_USE_SANDBOX` | Use APNs sandbox environment | `true` |
| `BISQ_RELAY_APNS_USE_SANDBOX` | Use APNs sandbox environment | `true` |

> **Note:** `BISQ_RELAY_APNS_USE_SANDBOX` defaults to `true` for safety. Production deployments must explicitly set this to `false`.

Expand All @@ -94,7 +78,8 @@ The service is configured via environment variables. The following variables are

### Run the Script

After building the project, a `bisq-relay` script will be generated at the root of the project.
After building the project using the `installDist` Gradle task, a script will be generated at
[build/install/bisq-relay/bin/bisq-relay](build/install/bisq-relay/bin/bisq-relay).

#### Development/Sandbox Mode

Expand All @@ -103,7 +88,7 @@ For development with APNs sandbox:
export BISQ_RELAY_APNS_BUNDLE_ID="your.app.bundle.id"
export BISQ_RELAY_APNS_CERTIFICATE_FILE=apnsCertificate.p12
export BISQ_RELAY_APNS_CERTIFICATE_PASSWORD_FILE=apnsCertificatePassword.txt
./bisq-relay
./build/install/bisq-relay/bin/bisq-relay
```

#### Production Mode
Expand All @@ -114,7 +99,7 @@ For production deployment:
export BISQ_RELAY_APNS_USE_SANDBOX=false
export BISQ_RELAY_APNS_CERTIFICATE_FILE=/path/to/apnsCertificate.production.p12
export BISQ_RELAY_APNS_CERTIFICATE_PASSWORD_FILE=/path/to/apnsCertificatePassword.txt
./bisq-relay
./build/install/bisq-relay/bin/bisq-relay
```

#### With FCM Enabled
Expand All @@ -125,23 +110,23 @@ To also enable FCM (Android) push notifications:
export BISQ_RELAY_APNS_USE_SANDBOX=false
export BISQ_RELAY_FCM_ENABLED=true
export BISQ_RELAY_FCM_FIREBASE_CONFIGURATION_FILE=/path/to/fcmServiceAccountKey.json
./bisq-relay
./build/install/bisq-relay/bin/bisq-relay
```

#### Legacy Configuration (Deprecated)

You can still use Java system properties if needed:
```sh
export BISQ_RELAY_OPTS="-Dapns.bundleId=your.app.bundle.id -Dapns.useSandbox=false"
./bisq-relay
./build/install/bisq-relay/bin/bisq-relay
```

## Deploying a Local Test Environment

Use the following docker command to deploy a complete local test environment:

```sh
docker compose up --build
```shell
docker compose up --build
```

Once deployed, the following will be available:
Expand Down
1 change: 0 additions & 1 deletion bisq-gradle
Submodule bisq-gradle deleted from 2c3483
21 changes: 13 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'application'
id 'bisq.post-build'
alias(libs.plugins.shadow)
alias(libs.plugins.springDependencyManagement)
alias(libs.plugins.springframeworkBoot)
Expand All @@ -16,11 +15,11 @@ group 'bisq'
version = file("src/main/resources/version.txt").text.trim()

application {
project.mainClassName = 'bisq.relay.Main'
mainClass = 'bisq.relay.Main'
}

bootJar {
project.mainClassName = 'bisq.relay.Main'
mainClass = 'bisq.relay.Main'
}

[test, run, bootRun].each { runTask ->
Expand All @@ -31,7 +30,7 @@ bootJar {

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(25))
}
}

Expand All @@ -41,25 +40,31 @@ jar.manifest.attributes(
)

dependencies {
implementation libs.spring.boot.aop
implementation libs.spring.boot.actuator
implementation libs.spring.boot.dependencies
implementation libs.spring.boot.web
implementation libs.spring.boot.validation
implementation libs.spring.boot.web

implementation libs.resilience4j.micrometer
implementation libs.resilience4j.spring.boot

runtimeOnly libs.micrometer.registry.prometheus

implementation(libs.firebase) {
exclude group: 'commons-logging', module: 'commons-logging'
}
implementation libs.pushy

implementation libs.spring.boot.actuator
runtimeOnly libs.micrometer.registry.prometheus

implementation libs.apache.commons.lang3

implementation libs.slf4j.api
implementation libs.logback.core
implementation libs.logback.classic

testImplementation libs.junit.jupiter
testImplementation libs.resilience4j.spring.boot
testImplementation libs.spring.boot.aop
testImplementation libs.spring.boot.test
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Visit the [Gradle website](https://gradle.org/releases) and determine the:

Adjust the following command with the arguments from above and execute it twice:

```sh
$ ./gradlew wrapper \
```shell
./gradlew wrapper \
--gradle-version 7.5 \
--distribution-type bin \
--gradle-distribution-sha256-sum cb87f222c5585bd46838ad4db78463a5c5f3d336e5e2b98dc7c0c586527351c2
Expand Down
30 changes: 17 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
# Convention: mark all versions using 'strictly'. This ensures only one version is allowed in the dependency tree, even
# when multiple versions are attempted to be brought in as transitive dependencies of other requirements.
[versions]
apache-commons-lib = { strictly = '3.18.0' }
firebase-lib = { strictly = '9.6.0' }
gradle-git-properties-plugin = { strictly = '2.5.2' }
junit-jupiter-lib = { strictly = '5.13.4' }
logback-lib = { strictly = '1.5.18' }
apache-commons-lib = { strictly = '3.20.0' }
firebase-lib = { strictly = '9.8.0' }
gradle-git-properties-plugin = { strictly = '2.5.4' }
junit-jupiter-lib = { strictly = '5.14.2' }
logback-lib = { strictly = '1.5.26' }
pushy-lib = { strictly = '0.15.4' }
resilience4j-lib = { strictly = '2.3.0' }
slf4j-lib = { strictly = '2.0.17' }
spring-boot-lib = { strictly = '3.5.6' }
shadow-plugin = { strictly = '7.1.2' }
spring-boot-lib = { strictly = '3.5.13' }
shadow-plugin = { strictly = '9.4.1' }
spring-plugin = { strictly = '1.1.7' }
springframework-plugin = { strictly = '3.3.13' }
springframework-plugin = { strictly = '3.5.10' }

# Referenced in subproject's build.gradle > dependencies block in the form 'implementation libs.guava'
# Note: keys can contain dash (protobuf-java) but the dash is replaced by dot when referenced
Expand All @@ -23,21 +24,24 @@ springframework-plugin = { strictly = '3.3.13' }
apache-commons-lang3 = { module = 'org.apache.commons:commons-lang3', version.ref = 'apache-commons-lib' }
firebase = { module = 'com.google.firebase:firebase-admin', version.ref = 'firebase-lib' }
junit-jupiter = { module = 'org.junit.jupiter:junit-jupiter', version.ref = 'junit-jupiter-lib' }
logback-core = { module = 'ch.qos.logback:logback-core', version.ref = 'logback-lib' }
logback-classic = { module = 'ch.qos.logback:logback-classic', version.ref = 'logback-lib' }
logback-core = { module = 'ch.qos.logback:logback-core', version.ref = 'logback-lib' }
micrometer-registry-prometheus = { module = 'io.micrometer:micrometer-registry-prometheus' }
pushy = { module = 'com.eatthepath:pushy', version.ref = 'pushy-lib' }
resilience4j-micrometer = { module = 'io.github.resilience4j:resilience4j-micrometer', version.ref = 'resilience4j-lib' }
resilience4j-spring-boot = { module = 'io.github.resilience4j:resilience4j-spring-boot3', version.ref = 'resilience4j-lib' }
slf4j-api = { module = 'org.slf4j:slf4j-api', version.ref = 'slf4j-lib' }
spring-boot-dependencies = { module = 'org.springframework.boot:spring-boot-dependencies', version.ref = 'spring-boot-lib' }
spring-boot-actuator = { module = 'org.springframework.boot:spring-boot-starter-actuator', version.ref = 'spring-boot-lib' }
spring-boot-web = { module = 'org.springframework.boot:spring-boot-starter-web', version.ref = 'spring-boot-lib' }
spring-boot-validation = { module = 'org.springframework.boot:spring-boot-starter-validation', version.ref = 'spring-boot-lib' }
spring-boot-aop = { module = 'org.springframework.boot:spring-boot-starter-aop', version.ref = 'spring-boot-lib' }
spring-boot-dependencies = { module = 'org.springframework.boot:spring-boot-dependencies', version.ref = 'spring-boot-lib' }
spring-boot-test = { module = 'org.springframework.boot:spring-boot-starter-test', version.ref = 'spring-boot-lib' }
spring-boot-validation = { module = 'org.springframework.boot:spring-boot-starter-validation', version.ref = 'spring-boot-lib' }
spring-boot-web = { module = 'org.springframework.boot:spring-boot-starter-web', version.ref = 'spring-boot-lib' }

[bundles]

[plugins]
shadow = { id = 'com.github.johnrengelman.shadow', version.ref = 'shadow-plugin' }
shadow = { id = 'com.gradleup.shadow', version.ref = 'shadow-plugin' }
springDependencyManagement = { id = 'io.spring.dependency-management', version.ref = 'spring-plugin' }
springframeworkBoot = { id = 'org.springframework.boot', version.ref = 'springframework-plugin' }
gradleGitProperties = { id = 'com.gorylenko.gradle-git-properties', version.ref = 'gradle-git-properties-plugin' }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 4 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=740c2e472ee4326c33bf75a5c9f5cd1e69ecf3f9b580f6e236c86d1f3d98cfac
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
distributionSha256Sum=2ab2958f2a1e51120c326cad6f385153bb11ee93b3c216c5fccebfdfbb7ec6cb
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading