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

Remove JDK Enforcement #6969

Merged
merged 6 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ build
*.java.hsw
*.~ava
/bundles
/bisq-*.bat
/bisq-*
/lib
/xchange
desktop.ini
Expand Down
34 changes: 31 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,21 @@ localnet: .localnet
# user, you'll need to manually run each of the targets listed below
# commands manually in a separate terminal or as background jobs.
deploy: setup
./gradlew :startRegtest
# ensure localnet is not already deployed
if screen -ls localnet | grep Detached; then false; fi
# create a new screen session named 'localnet'
screen -dmS localnet
# deploy each node in its own named screen window
for target in \
bitcoind \
seednode \
seednode2 \
alice \
bob \
mediator; do \
screen -S localnet -X screen -t $$target; \
screen -S localnet -p $$target -X stuff "make $$target\n"; \
done;
# give bitcoind rpc server time to start
sleep 5
# generate a block to ensure Bisq nodes get dao-synced
Expand All @@ -156,10 +170,24 @@ deploy: setup
# Undeploy a running localnet by killing all Bitcoin and Bisq
# node processes, then killing the localnet screen session altogether
undeploy:
./gradlew :stopRegtest
# kill all Bitcoind and Bisq nodes running in screen windows
screen -S localnet -X at "#" stuff "^C"
# quit all screen windows which results in killing the session
screen -S localnet -X at "#" kill
# remove dead screens
screen -wipe || true

bitcoind: .localnet
./gradlew :stopRegtestBitcoind :startRegtestBitcoind
bitcoind \
-regtest \
-prune=0 \
-txindex=1 \
-peerbloomfilters=1 \
-server \
-rpcuser=bisqdao \
-rpcpassword=bsq \
-datadir=.localnet/bitcoind \
-blocknotify='.localnet/bitcoind/blocknotify %s'

seednode: seednode/build
./bisq-seednode \
Expand Down
16 changes: 0 additions & 16 deletions bisq-apitest

This file was deleted.

16 changes: 0 additions & 16 deletions bisq-cli

This file was deleted.

16 changes: 0 additions & 16 deletions bisq-daemon

This file was deleted.

16 changes: 0 additions & 16 deletions bisq-desktop

This file was deleted.

16 changes: 0 additions & 16 deletions bisq-seednode

This file was deleted.

16 changes: 0 additions & 16 deletions bisq-statsnode

This file was deleted.

38 changes: 38 additions & 0 deletions build-logic/commons/src/main/groovy/bisq.application.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,41 @@ build.dependsOn installDist
installDist.destinationDir = file('build/app')
distZip.enabled = false
distTar.enabled = false

// the 'installDist' and 'startScripts' blocks below configure bisq executables to put
// generated shell scripts in the root project directory, such that users can easily
// discover and invoke e.g. ./bisq-desktop, ./bisq-seednode, etc.
// See https://stackoverflow.com/q/46327736 for details.

installDist {
doLast {
// copy generated shell scripts, e.g. `bisq-desktop` directly to the project
// root directory for discoverability and ease of use

copy {
from "$destinationDir/bin"
into projectDir.parentFile
}
// copy libs required for generated shell script classpaths to 'lib' dir under
// the project root directory
copy {
from "$destinationDir/lib"
into "${projectDir.parentFile}/lib"
}

// edit generated shell scripts such that they expect to be executed in the
// project root dir as opposed to a 'bin' subdirectory
def windowsScriptFile = file("${rootProject.projectDir}/bisq-${applicationName}.bat")
windowsScriptFile.text = windowsScriptFile.text.replace(
'set APP_HOME=%DIRNAME%..', 'set APP_HOME=%DIRNAME%')

def unixScriptFile = file("${rootProject.projectDir}/bisq-$applicationName")
unixScriptFile.text = unixScriptFile.text.replace(
'APP_HOME=$( cd "${APP_HOME:-./}.." && pwd -P ) || exit', 'APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit')
}
}

startScripts {
// rename scripts from, e.g. `desktop` to `bisq-desktop`
applicationName = "bisq-$applicationName"
}
6 changes: 3 additions & 3 deletions seednode/bisq.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# configuration for bisq service
# install in /etc/default/bisq.env

# java home, set to openjdk 10
JAVA_HOME=/usr/lib/jvm/openjdk-11.0.2
# java home, set to latest openjdk 11 from os repository
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

# java memory and remote management options
JAVA_OPTS="-Xms4096M -Xmx4096M -XX:+ExitOnOutOfMemoryError"
Expand All @@ -27,7 +27,7 @@ BITCOIN_RPC_BLOCKNOTIFY_PORT=5120
# bisq pathnames
BISQ_HOME=__BISQ_HOME__
BISQ_APP_NAME=bisq-seednode
BISQ_ENTRYPOINT=seednode/build/app/bin/seednode
BISQ_ENTRYPOINT=seednode/build/app/bin/bisq-seednode
BISQ_BASE_CURRENCY=btc_mainnet

# bisq node settings
Expand Down