Bisq 2 is a decentralized trading platform.
- Java (JDK 21 required)
- Gradle (Kotlin DSL)
- JavaFX (required for desktop app)
apps/— composite build for desktop app, seed node app, installersnetwork/— composite build for networking componentscommon/,platform/,presentation/,application/,trade/, etc. — core modulesdocs/dev/— dev guide, build instructions, code guidelines
Common commands (macOS/Linux):
- Build all:
./gradlew clean build - Build without tests:
./gradlew clean build -x test - Install desktop app:
./gradlew :apps:desktop:desktop-app:installDist - Run desktop app:
./apps/desktop/desktop-app/build/install/desktop-app/bin/desktop-app
Seed node:
- Install seed node:
./gradlew :apps:seed-node-app:installDist
Full clean/rebuild:
./gradlew cleanAll buildAll
See Makefile for multi‑node local test setups (clearnet/tor/i2p) using screen:
make start-clearnet-full-env n=2make start-tor-seeds→ thenmake start-tor-full-env n=2
- JVM args are the primary config mechanism (typesafe config)
- Program args supported:
--app-name,--data-dir - Custom config file:
bisq.confin the data dir
- One
.protofile per module; package name matches module name option java_package = "bisq.<module>.protobuf"- Field names use lowerCamelCase (not underscore)
- Enums use ALL_CAPS with a type prefix (e.g.,
CHATMESSAGETYPE_TEXT) - Optional Java fields should use
optionalin proto
- Add or update tests when behavior changes
- Keep tests deterministic and fast
- Respect existing JUnit parallelization and resource locks
- Never disable or weaken assertions
- If a change cannot be reasonably tested, explain why
Human contributors have final authority. Agents are assistants, not decision-makers.
When uncertain: do nothing and ask.
- Follow
docs/dev/code-guidelines.md- Lombok for getters/setters/toString/equals/hashCode
- K&R brace style, always use braces
- Use comment separators for logical grouping in larger classes, with 2 line breaks following them:
/* --------------------------------------------------------------------- */ // Group Name /* --------------------------------------------------------------------- */ - Avoid nullable values; use
Optionaland@Nullablewhere needed - Use the most narrow visibility scope
- Do not use
finalin local scope or with arguments, only in class fields - Use Java records only for simple value objects
- Always use
@Overridewhen overriding methods - Ternary operator style: single line for short conditions, multi-line for longer ones with '?' and ':' in next line
- For UI classes, list fields of the same type in one line to reduce vertical noise
- Prefer existing utilities from
bisq.common.utilwhen appropriate, especiallyStringUtilsandByteArrayUtils - When exposing observables for read-only usage, use
ReadOnly*types frombisq.common.observableand its subpackages (for exampleReadOnlyObservableandReadOnlyObservableMap, and collection variants) - In Bisq MVC controllers, if there are multiple subscriptions or pins, use:
private final Set<Subscription> subscriptions = new HashSet<>();private final Set<Pin> pins = new HashSet<>();- and in
onDeactivate()unsubscribe/unbind and clear both sets:subscriptions.forEach(Subscription::unsubscribe);subscriptions.clear();pins.forEach(Pin::unbind);pins.clear();
- In Bisq MVC views, if there are multiple subscriptions, use:
private final Set<Subscription> subscriptions = new HashSet<>();- and in
onDeactivate()unsubscribe/unbind subscriptions:subscriptions.forEach(Subscription::unsubscribe);subscriptions.clear();
@VisibleForTestingusage rule:- Only annotate constructors and methods that are actually called by tests and would otherwise be
private - Do not use
@VisibleForTestingon constructors or methods if called from other non-test classes.
- Only annotate constructors and methods that are actually called by tests and would otherwise be
- See
docs/dev/contributing.mdfor PR workflow and commit style - For i18n strings, only update the base file in
i18n/src/main/resources/<name>.propertiesand do not edit..._<lang>.propertiesfiles directly.
docs/dev/build.mddocs/dev/dev-guide.mddocs/dev/code-guidelines.mddocs/dev/protobuf-notes.md
Bisq 2 is licensed under the AGPL-3.0. All contributions are subject to this license.