2018-11-04 16:55:33 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2021-05-16 15:17:44 +02:00
|
|
|
mavenCentral()
|
|
|
|
maven { url "https://jitpack.io" }
|
2021-05-17 12:55:32 +02:00
|
|
|
maven { url "https://plugins.gradle.org/m2/" }
|
2018-11-04 16:55:33 +01:00
|
|
|
}
|
|
|
|
dependencies {
|
2021-11-12 23:29:28 +01:00
|
|
|
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.17'
|
2018-11-04 16:55:33 +01:00
|
|
|
classpath 'com.google.gradle:osdetector-gradle-plugin:1.6.0'
|
2021-05-17 12:55:32 +02:00
|
|
|
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
|
2021-05-20 16:19:48 +02:00
|
|
|
classpath 'org.openjfx:javafx-plugin:0.0.10'
|
2018-11-04 16:55:33 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Generate scripts for Bisq executables in root dir
This change configures the Gradle build to generate "start scripts" for
each Bisq executable (e.g. Bisq Desktop, Bisq Seednode, etc) in the root
project directory, such that after invoking `./gradle build`, the
following executable scripts become available:
~/Work/bisq-network/bisq
$ ls -1 | egrep '(bisq*|lib)'
bisq-desktop
bisq-desktop.bat
bisq-monitor
bisq-monitor.bat
bisq-relay
bisq-relay.bat
bisq-seednode
bisq-seednode.bat
bisq-statsnode
bisq-statsnode.bat
lib
This makes it possible for users (developers) to easily discover and use
these scripts in an idiomatic and platform-agnostic way as opposed to
the previous situation where we would advise users to run e.g.
java -jar desktop/build/libs/desktop-0.8.0-SNAPSHOT-all.jar
This approach works, but is cumbersome and focuses unnecessarily on the
Java-based nature of the project. Now, with the changes in this commit,
the user would simply run:
./bisq-desktop
The 'lib' directory shown above contains all the jar files necessary to
construct classpaths for these various scripts. The 'cleanInstallDist'
task deletes the 'bisq-*' files and the 'lib' directory, and the default
'clean' task has been configured to depend on the 'cleanInstallDist'
task to ensure this cleanup happens automatically when most users would
expect it.
In the future, these same scripts can be used when installing Bisq
executables properly on users' systems via package managers like Brew
and Apt. The goal is to have the user experience around running
`bisq-desktop` (and more importantly, the forthcoming `bisqd`) be
similar in every way to installing and using `bitcoind`, `lnd` and other
idiomatic *nix-style utilities, be they Bitcoin-related or not.
See the changes in docs/build.md and docs/dev-setup.md for a further
sense of the how this change impacts the developer experience.
2018-11-23 14:33:44 +01:00
|
|
|
configure(rootProject) {
|
2021-05-18 17:19:56 +02:00
|
|
|
|
Generate scripts for Bisq executables in root dir
This change configures the Gradle build to generate "start scripts" for
each Bisq executable (e.g. Bisq Desktop, Bisq Seednode, etc) in the root
project directory, such that after invoking `./gradle build`, the
following executable scripts become available:
~/Work/bisq-network/bisq
$ ls -1 | egrep '(bisq*|lib)'
bisq-desktop
bisq-desktop.bat
bisq-monitor
bisq-monitor.bat
bisq-relay
bisq-relay.bat
bisq-seednode
bisq-seednode.bat
bisq-statsnode
bisq-statsnode.bat
lib
This makes it possible for users (developers) to easily discover and use
these scripts in an idiomatic and platform-agnostic way as opposed to
the previous situation where we would advise users to run e.g.
java -jar desktop/build/libs/desktop-0.8.0-SNAPSHOT-all.jar
This approach works, but is cumbersome and focuses unnecessarily on the
Java-based nature of the project. Now, with the changes in this commit,
the user would simply run:
./bisq-desktop
The 'lib' directory shown above contains all the jar files necessary to
construct classpaths for these various scripts. The 'cleanInstallDist'
task deletes the 'bisq-*' files and the 'lib' directory, and the default
'clean' task has been configured to depend on the 'cleanInstallDist'
task to ensure this cleanup happens automatically when most users would
expect it.
In the future, these same scripts can be used when installing Bisq
executables properly on users' systems via package managers like Brew
and Apt. The goal is to have the user experience around running
`bisq-desktop` (and more importantly, the forthcoming `bisqd`) be
similar in every way to installing and using `bitcoind`, `lnd` and other
idiomatic *nix-style utilities, be they Bitcoin-related or not.
See the changes in docs/build.md and docs/dev-setup.md for a further
sense of the how this change impacts the developer experience.
2018-11-23 14:33:44 +01:00
|
|
|
// remove the 'bisq-*' scripts and 'lib' dir generated by the 'installDist' task
|
|
|
|
task clean {
|
|
|
|
doLast {
|
|
|
|
delete fileTree(dir: rootProject.projectDir, include: 'bisq-*'), 'lib'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-11-04 18:43:20 +01:00
|
|
|
|
2018-11-04 16:27:52 +01:00
|
|
|
configure(subprojects) {
|
2018-11-04 18:16:07 +01:00
|
|
|
apply plugin: 'com.google.osdetector'
|
|
|
|
|
2019-08-21 08:35:58 +02:00
|
|
|
ext { // in alphabetical order
|
2021-11-12 23:29:28 +01:00
|
|
|
grpcVersion = '1.42.1'
|
2021-05-17 11:07:41 +02:00
|
|
|
javafxVersion = '16'
|
2022-12-09 14:45:26 +01:00
|
|
|
protocVersion = '3.19.1'
|
2018-11-04 18:41:56 +01:00
|
|
|
|
2018-11-04 18:16:07 +01:00
|
|
|
os = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os
|
|
|
|
}
|
2018-11-04 13:40:00 +01:00
|
|
|
}
|
2018-11-04 16:27:52 +01:00
|
|
|
|
2018-11-04 18:43:20 +01:00
|
|
|
|
2019-11-20 21:04:34 +01:00
|
|
|
configure([project(':cli'),
|
2019-11-22 19:39:46 +01:00
|
|
|
project(':daemon'),
|
2019-11-20 21:04:34 +01:00
|
|
|
project(':desktop'),
|
2018-11-04 16:27:52 +01:00
|
|
|
project(':seednode'),
|
2019-04-16 09:47:34 +02:00
|
|
|
project(':statsnode'),
|
2020-07-09 21:15:29 +02:00
|
|
|
project(':apitest')]) {
|
Generate scripts for Bisq executables in root dir
This change configures the Gradle build to generate "start scripts" for
each Bisq executable (e.g. Bisq Desktop, Bisq Seednode, etc) in the root
project directory, such that after invoking `./gradle build`, the
following executable scripts become available:
~/Work/bisq-network/bisq
$ ls -1 | egrep '(bisq*|lib)'
bisq-desktop
bisq-desktop.bat
bisq-monitor
bisq-monitor.bat
bisq-relay
bisq-relay.bat
bisq-seednode
bisq-seednode.bat
bisq-statsnode
bisq-statsnode.bat
lib
This makes it possible for users (developers) to easily discover and use
these scripts in an idiomatic and platform-agnostic way as opposed to
the previous situation where we would advise users to run e.g.
java -jar desktop/build/libs/desktop-0.8.0-SNAPSHOT-all.jar
This approach works, but is cumbersome and focuses unnecessarily on the
Java-based nature of the project. Now, with the changes in this commit,
the user would simply run:
./bisq-desktop
The 'lib' directory shown above contains all the jar files necessary to
construct classpaths for these various scripts. The 'cleanInstallDist'
task deletes the 'bisq-*' files and the 'lib' directory, and the default
'clean' task has been configured to depend on the 'cleanInstallDist'
task to ensure this cleanup happens automatically when most users would
expect it.
In the future, these same scripts can be used when installing Bisq
executables properly on users' systems via package managers like Brew
and Apt. The goal is to have the user experience around running
`bisq-desktop` (and more importantly, the forthcoming `bisqd`) be
similar in every way to installing and using `bitcoind`, `lnd` and other
idiomatic *nix-style utilities, be they Bitcoin-related or not.
See the changes in docs/build.md and docs/dev-setup.md for a further
sense of the how this change impacts the developer experience.
2018-11-23 14:33:44 +01:00
|
|
|
|
2018-11-04 16:27:52 +01:00
|
|
|
apply plugin: 'application'
|
|
|
|
|
|
|
|
build.dependsOn installDist
|
|
|
|
installDist.destinationDir = file('build/app')
|
|
|
|
distZip.enabled = false
|
2022-12-07 17:47:14 +01:00
|
|
|
distTar.enabled = false
|
Generate scripts for Bisq executables in root dir
This change configures the Gradle build to generate "start scripts" for
each Bisq executable (e.g. Bisq Desktop, Bisq Seednode, etc) in the root
project directory, such that after invoking `./gradle build`, the
following executable scripts become available:
~/Work/bisq-network/bisq
$ ls -1 | egrep '(bisq*|lib)'
bisq-desktop
bisq-desktop.bat
bisq-monitor
bisq-monitor.bat
bisq-relay
bisq-relay.bat
bisq-seednode
bisq-seednode.bat
bisq-statsnode
bisq-statsnode.bat
lib
This makes it possible for users (developers) to easily discover and use
these scripts in an idiomatic and platform-agnostic way as opposed to
the previous situation where we would advise users to run e.g.
java -jar desktop/build/libs/desktop-0.8.0-SNAPSHOT-all.jar
This approach works, but is cumbersome and focuses unnecessarily on the
Java-based nature of the project. Now, with the changes in this commit,
the user would simply run:
./bisq-desktop
The 'lib' directory shown above contains all the jar files necessary to
construct classpaths for these various scripts. The 'cleanInstallDist'
task deletes the 'bisq-*' files and the 'lib' directory, and the default
'clean' task has been configured to depend on the 'cleanInstallDist'
task to ensure this cleanup happens automatically when most users would
expect it.
In the future, these same scripts can be used when installing Bisq
executables properly on users' systems via package managers like Brew
and Apt. The goal is to have the user experience around running
`bisq-desktop` (and more importantly, the forthcoming `bisqd`) be
similar in every way to installing and using `bitcoind`, `lnd` and other
idiomatic *nix-style utilities, be they Bitcoin-related or not.
See the changes in docs/build.md and docs/dev-setup.md for a further
sense of the how this change impacts the developer experience.
2018-11-23 14:33:44 +01:00
|
|
|
|
|
|
|
// 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
|
2018-11-26 15:24:06 +01:00
|
|
|
|
Generate scripts for Bisq executables in root dir
This change configures the Gradle build to generate "start scripts" for
each Bisq executable (e.g. Bisq Desktop, Bisq Seednode, etc) in the root
project directory, such that after invoking `./gradle build`, the
following executable scripts become available:
~/Work/bisq-network/bisq
$ ls -1 | egrep '(bisq*|lib)'
bisq-desktop
bisq-desktop.bat
bisq-monitor
bisq-monitor.bat
bisq-relay
bisq-relay.bat
bisq-seednode
bisq-seednode.bat
bisq-statsnode
bisq-statsnode.bat
lib
This makes it possible for users (developers) to easily discover and use
these scripts in an idiomatic and platform-agnostic way as opposed to
the previous situation where we would advise users to run e.g.
java -jar desktop/build/libs/desktop-0.8.0-SNAPSHOT-all.jar
This approach works, but is cumbersome and focuses unnecessarily on the
Java-based nature of the project. Now, with the changes in this commit,
the user would simply run:
./bisq-desktop
The 'lib' directory shown above contains all the jar files necessary to
construct classpaths for these various scripts. The 'cleanInstallDist'
task deletes the 'bisq-*' files and the 'lib' directory, and the default
'clean' task has been configured to depend on the 'cleanInstallDist'
task to ensure this cleanup happens automatically when most users would
expect it.
In the future, these same scripts can be used when installing Bisq
executables properly on users' systems via package managers like Brew
and Apt. The goal is to have the user experience around running
`bisq-desktop` (and more importantly, the forthcoming `bisqd`) be
similar in every way to installing and using `bitcoind`, `lnd` and other
idiomatic *nix-style utilities, be they Bitcoin-related or not.
See the changes in docs/build.md and docs/dev-setup.md for a further
sense of the how this change impacts the developer experience.
2018-11-23 14:33:44 +01:00
|
|
|
copy {
|
|
|
|
from "$destinationDir/bin"
|
|
|
|
into rootProject.projectDir
|
|
|
|
}
|
|
|
|
// copy libs required for generated shell script classpaths to 'lib' dir under
|
|
|
|
// the project root directory
|
|
|
|
copy {
|
|
|
|
from "$destinationDir/lib"
|
|
|
|
into "${rootProject.projectDir}/lib"
|
|
|
|
}
|
2018-11-24 10:07:39 +01:00
|
|
|
|
2018-11-27 02:52:35 +01:00
|
|
|
// edit generated shell scripts such that they expect to be executed in the
|
|
|
|
// project root dir as opposed to a 'bin' subdirectory
|
2018-11-27 10:31:44 +01:00
|
|
|
def windowsScriptFile = file("${rootProject.projectDir}/bisq-${applicationName}.bat")
|
2018-11-27 02:52:35 +01:00
|
|
|
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(
|
2021-11-15 13:03:49 +01:00
|
|
|
'APP_HOME=$( cd "${APP_HOME:-./}.." && pwd -P ) || exit', 'APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit')
|
2018-11-27 02:52:35 +01:00
|
|
|
|
2020-03-11 14:54:04 +01:00
|
|
|
if (applicationName == 'desktop') {
|
|
|
|
def script = file("${rootProject.projectDir}/bisq-$applicationName")
|
|
|
|
script.text = script.text.replace(
|
2021-07-19 20:51:13 +02:00
|
|
|
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-XX:MaxRAM=8g -Xss1280k -XX:+UseG1GC ' +
|
2021-07-19 15:53:46 +02:00
|
|
|
'-XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=5 -XX:+UseStringDeduplication ' +
|
|
|
|
'-Djava.net.preferIPv4Stack=true"')
|
2020-03-11 14:54:04 +01:00
|
|
|
}
|
2020-03-11 14:20:59 +01:00
|
|
|
|
2020-07-09 21:15:29 +02:00
|
|
|
if (applicationName == 'apitest') {
|
2020-07-10 20:00:50 +02:00
|
|
|
// Pass the logback config file as a system property to avoid chatty
|
|
|
|
// logback startup due to multiple logback.xml files in the classpath
|
|
|
|
// (:daemon & :cli).
|
2020-07-09 21:15:29 +02:00
|
|
|
def script = file("${rootProject.projectDir}/bisq-$applicationName")
|
|
|
|
script.text = script.text.replace(
|
2020-07-10 20:00:50 +02:00
|
|
|
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="' +
|
|
|
|
'-Dlogback.configurationFile=apitest/build/resources/main/logback.xml"')
|
2020-07-09 21:15:29 +02:00
|
|
|
}
|
|
|
|
|
2018-11-24 10:07:39 +01:00
|
|
|
if (osdetector.os != 'windows')
|
|
|
|
delete fileTree(dir: rootProject.projectDir, include: 'bisq-*.bat')
|
2018-11-25 09:35:04 +01:00
|
|
|
else
|
|
|
|
delete fileTree(dir: rootProject.projectDir, include: 'bisq-*', exclude: '*.bat')
|
Generate scripts for Bisq executables in root dir
This change configures the Gradle build to generate "start scripts" for
each Bisq executable (e.g. Bisq Desktop, Bisq Seednode, etc) in the root
project directory, such that after invoking `./gradle build`, the
following executable scripts become available:
~/Work/bisq-network/bisq
$ ls -1 | egrep '(bisq*|lib)'
bisq-desktop
bisq-desktop.bat
bisq-monitor
bisq-monitor.bat
bisq-relay
bisq-relay.bat
bisq-seednode
bisq-seednode.bat
bisq-statsnode
bisq-statsnode.bat
lib
This makes it possible for users (developers) to easily discover and use
these scripts in an idiomatic and platform-agnostic way as opposed to
the previous situation where we would advise users to run e.g.
java -jar desktop/build/libs/desktop-0.8.0-SNAPSHOT-all.jar
This approach works, but is cumbersome and focuses unnecessarily on the
Java-based nature of the project. Now, with the changes in this commit,
the user would simply run:
./bisq-desktop
The 'lib' directory shown above contains all the jar files necessary to
construct classpaths for these various scripts. The 'cleanInstallDist'
task deletes the 'bisq-*' files and the 'lib' directory, and the default
'clean' task has been configured to depend on the 'cleanInstallDist'
task to ensure this cleanup happens automatically when most users would
expect it.
In the future, these same scripts can be used when installing Bisq
executables properly on users' systems via package managers like Brew
and Apt. The goal is to have the user experience around running
`bisq-desktop` (and more importantly, the forthcoming `bisqd`) be
similar in every way to installing and using `bitcoind`, `lnd` and other
idiomatic *nix-style utilities, be they Bitcoin-related or not.
See the changes in docs/build.md and docs/dev-setup.md for a further
sense of the how this change impacts the developer experience.
2018-11-23 14:33:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
startScripts {
|
|
|
|
// rename scripts from, e.g. `desktop` to `bisq-desktop`
|
|
|
|
applicationName = "bisq-$applicationName"
|
|
|
|
}
|
2018-11-04 16:27:52 +01:00
|
|
|
}
|
2018-11-04 16:44:10 +01:00
|
|
|
|
2018-11-04 18:43:20 +01:00
|
|
|
|
2018-11-04 16:55:33 +01:00
|
|
|
configure(project(':common')) {
|
2021-05-20 16:19:48 +02:00
|
|
|
apply plugin: 'org.openjfx.javafxplugin'
|
|
|
|
|
|
|
|
javafx {
|
|
|
|
version = "$javafxVersion"
|
2021-10-28 02:54:52 +02:00
|
|
|
modules = ['javafx.graphics']
|
2021-05-20 16:19:48 +02:00
|
|
|
}
|
|
|
|
|
2022-10-30 04:12:31 +01:00
|
|
|
ext.getHash = {
|
|
|
|
def p1 = 'git rev-parse HEAD'.execute()
|
|
|
|
p1.waitFor()
|
2022-12-07 17:46:26 +01:00
|
|
|
return p1.text
|
2022-10-30 04:12:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
jar.manifest.attributes(
|
|
|
|
"Implementation-Version": getHash())
|
|
|
|
|
2018-11-04 16:55:33 +01:00
|
|
|
dependencies {
|
2021-11-12 23:29:28 +01:00
|
|
|
implementation project(':proto')
|
2022-12-09 14:45:26 +01:00
|
|
|
annotationProcessor libs.lombok
|
|
|
|
compileOnly libs.javax.annotation
|
|
|
|
compileOnly libs.lombok
|
|
|
|
implementation libs.logback.classic
|
|
|
|
implementation libs.logback.core
|
|
|
|
implementation(libs.bitcoinj) {
|
2019-04-09 17:01:47 +02:00
|
|
|
exclude(module: 'bcprov-jdk15on')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'guava')
|
|
|
|
exclude(module: 'jsr305')
|
2020-09-16 18:10:09 +02:00
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'protobuf-java')
|
|
|
|
exclude(module: 'slf4j-api')
|
2018-11-04 16:55:33 +01:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation libs.google.findbugs
|
|
|
|
implementation libs.google.gson
|
|
|
|
implementation libs.google.guava
|
|
|
|
implementation(libs.google.guice) {
|
2020-03-26 14:00:07 +01:00
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation libs.protobuf.java
|
|
|
|
implementation libs.commons.io
|
|
|
|
implementation libs.jopt
|
|
|
|
implementation libs.apache.commons.lang3
|
|
|
|
implementation libs.bouncycastle.bcpg.jdk15on
|
|
|
|
implementation libs.kotlin.stdlib.jdk8
|
|
|
|
implementation libs.jetbrains.annotations
|
|
|
|
implementation libs.slf4j.api
|
|
|
|
testImplementation libs.hamcrest
|
|
|
|
runtimeOnly(libs.grpc.netty.shaded) {
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
2018-11-04 16:55:33 +01:00
|
|
|
}
|
|
|
|
}
|
2018-11-04 17:18:46 +01:00
|
|
|
|
2018-11-04 18:43:20 +01:00
|
|
|
|
2018-11-04 17:46:03 +01:00
|
|
|
configure(project(':p2p')) {
|
2021-05-20 16:19:48 +02:00
|
|
|
apply plugin: 'org.openjfx.javafxplugin'
|
|
|
|
|
|
|
|
javafx {
|
|
|
|
version = "$javafxVersion"
|
2021-10-28 02:54:52 +02:00
|
|
|
modules = ['javafx.base']
|
2021-05-20 16:19:48 +02:00
|
|
|
}
|
|
|
|
|
2018-11-04 17:46:03 +01:00
|
|
|
dependencies {
|
2021-11-12 23:29:28 +01:00
|
|
|
implementation project(':proto')
|
|
|
|
implementation project(':common')
|
2022-12-09 14:45:26 +01:00
|
|
|
annotationProcessor libs.lombok
|
|
|
|
compileOnly libs.lombok
|
|
|
|
implementation libs.google.guava
|
|
|
|
implementation libs.protobuf.java
|
|
|
|
implementation libs.fxmisc.easybind
|
|
|
|
implementation libs.slf4j.api
|
|
|
|
implementation(libs.netlayer.tor.external) {
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'slf4j-api')
|
2021-11-13 14:45:14 +01:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.netlayer.tor.native) {
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.bitcoinj) {
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'bcprov-jdk15on')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'guava')
|
|
|
|
exclude(module: 'jsr305')
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'protobuf-java')
|
|
|
|
exclude(module: 'slf4j-api')
|
2021-11-12 23:29:28 +01:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.google.guice) {
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.apache.httpclient) {
|
2020-03-22 20:01:54 +01:00
|
|
|
exclude(module: 'commons-codec')
|
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
testAnnotationProcessor libs.lombok
|
|
|
|
testCompileOnly libs.lombok
|
|
|
|
testImplementation libs.logback.classic
|
|
|
|
testImplementation libs.logback.core
|
|
|
|
testImplementation libs.apache.commons.lang3
|
|
|
|
testImplementation libs.mockito
|
2018-11-04 17:46:03 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-11-04 18:43:20 +01:00
|
|
|
|
2018-11-04 17:18:46 +01:00
|
|
|
configure(project(':core')) {
|
2021-05-20 16:19:48 +02:00
|
|
|
apply plugin: 'org.openjfx.javafxplugin'
|
|
|
|
|
|
|
|
javafx {
|
|
|
|
version = "$javafxVersion"
|
2021-10-28 02:54:52 +02:00
|
|
|
modules = ['javafx.base']
|
2021-05-20 16:19:48 +02:00
|
|
|
}
|
|
|
|
|
2018-11-04 17:18:46 +01:00
|
|
|
dependencies {
|
2021-11-12 23:29:28 +01:00
|
|
|
implementation project(':proto')
|
|
|
|
implementation project(':assets')
|
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':p2p')
|
2022-12-09 14:45:26 +01:00
|
|
|
annotationProcessor libs.lombok
|
|
|
|
compileOnly libs.javax.annotation
|
|
|
|
compileOnly libs.lombok
|
|
|
|
implementation libs.logback.classic
|
|
|
|
implementation libs.logback.core
|
|
|
|
implementation libs.jackson.annotations
|
|
|
|
implementation libs.jackson.core
|
|
|
|
implementation libs.google.findbugs
|
|
|
|
implementation libs.google.gson
|
|
|
|
implementation libs.google.guava
|
|
|
|
implementation libs.protobuf.java
|
|
|
|
implementation libs.commons.codec
|
|
|
|
implementation libs.commons.io
|
|
|
|
implementation libs.jopt
|
|
|
|
implementation libs.apache.commons.lang3
|
|
|
|
implementation libs.apache.httpcore
|
|
|
|
implementation libs.fxmisc.easybind
|
|
|
|
implementation libs.jetbrains.annotations
|
|
|
|
implementation libs.slf4j.api
|
|
|
|
implementation(libs.jackson.databind) {
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'jackson-annotations')
|
2021-11-12 23:29:28 +01:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.netlayer.tor.external) {
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.netlayer.tor.native) {
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'slf4j-api')
|
2021-11-13 14:45:14 +01:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.bitcoinj) {
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'bcprov-jdk15on')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'guava')
|
|
|
|
exclude(module: 'jsr305')
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'protobuf-java')
|
|
|
|
exclude(module: 'slf4j-api')
|
2021-11-12 23:29:28 +01:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.jsonrpc4j) {
|
2020-12-21 18:46:01 +01:00
|
|
|
exclude(module: 'base64')
|
2021-02-04 08:51:38 +01:00
|
|
|
exclude(module: 'httpcore-nio')
|
2018-11-04 17:18:46 +01:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.google.guice) {
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'guava')
|
2018-11-04 17:18:46 +01:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.apache.httpclient) {
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'commons-codec')
|
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
testAnnotationProcessor libs.lombok
|
|
|
|
testCompileOnly libs.lombok
|
|
|
|
testImplementation libs.natpryce.make.it.easy
|
|
|
|
testImplementation libs.hamcrest
|
|
|
|
testImplementation libs.mockito
|
2018-11-04 17:18:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
systemProperty 'jdk.attach.allowAttachSelf', true
|
|
|
|
}
|
|
|
|
}
|
2018-11-04 17:37:32 +01:00
|
|
|
|
|
|
|
configure(project(':desktop')) {
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
2021-05-20 16:19:48 +02:00
|
|
|
apply plugin: 'org.openjfx.javafxplugin'
|
2020-09-22 18:18:28 +02:00
|
|
|
apply from: 'package/package.gradle'
|
2018-11-04 17:37:32 +01:00
|
|
|
|
2022-12-14 02:41:02 +01:00
|
|
|
shadowDistTar.enabled = false
|
|
|
|
shadowDistZip.enabled = false
|
|
|
|
|
2021-05-20 16:19:48 +02:00
|
|
|
javafx {
|
|
|
|
version = "$javafxVersion"
|
2021-10-28 02:54:52 +02:00
|
|
|
modules = ['javafx.controls', 'javafx.fxml']
|
2021-05-20 16:19:48 +02:00
|
|
|
}
|
|
|
|
|
2022-07-19 19:28:08 +02:00
|
|
|
version = file("src/main/resources/version.txt").text.trim()
|
2018-11-04 17:37:32 +01:00
|
|
|
|
2020-09-19 20:48:28 +02:00
|
|
|
jar.manifest.attributes(
|
|
|
|
"Implementation-Title": project.name,
|
|
|
|
"Implementation-Version": version)
|
|
|
|
|
2018-11-04 17:37:32 +01:00
|
|
|
mainClassName = 'bisq.desktop.app.BisqAppMain'
|
|
|
|
|
2021-11-12 23:29:28 +01:00
|
|
|
jar {
|
2018-11-04 17:37:32 +01:00
|
|
|
preserveFileTimestamps = false
|
|
|
|
reproducibleFileOrder = true
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets.main.resources.srcDirs += ['src/main/java'] // to copy fxml and css files
|
|
|
|
|
|
|
|
dependencies {
|
2021-11-12 23:29:28 +01:00
|
|
|
implementation project(':assets')
|
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':proto')
|
|
|
|
implementation project(':p2p')
|
|
|
|
implementation project(':core')
|
2022-12-09 14:45:26 +01:00
|
|
|
annotationProcessor libs.lombok
|
|
|
|
compileOnly libs.lombok
|
|
|
|
implementation libs.logback.classic
|
|
|
|
implementation libs.logback.core
|
|
|
|
implementation libs.google.gson
|
|
|
|
implementation libs.google.guava
|
|
|
|
implementation libs.protobuf.java
|
|
|
|
implementation libs.jcsv
|
|
|
|
implementation libs.jfoenix
|
|
|
|
implementation libs.commons.io
|
|
|
|
implementation libs.fontawesomefx
|
|
|
|
implementation libs.fontawesomefx.commons
|
|
|
|
implementation libs.fontawesomefx.materialdesign.font
|
|
|
|
implementation libs.qrgen
|
|
|
|
implementation libs.apache.commons.lang3
|
|
|
|
implementation libs.bouncycastle.bcpg.jdk15on
|
|
|
|
implementation libs.fxmisc.easybind
|
|
|
|
implementation libs.jetbrains.annotations
|
|
|
|
implementation libs.slf4j.api
|
|
|
|
implementation(libs.bitcoinj) {
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'bcprov-jdk15on')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'guava')
|
|
|
|
exclude(module: 'jsr305')
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'protobuf-java')
|
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.google.guice) {
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'guava')
|
2021-11-12 23:29:28 +01:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
testAnnotationProcessor libs.lombok
|
|
|
|
testCompileOnly libs.lombok
|
|
|
|
testImplementation libs.natpryce.make.it.easy
|
|
|
|
testImplementation libs.mockito
|
2018-11-04 17:37:32 +01:00
|
|
|
}
|
2019-01-11 16:59:18 +01:00
|
|
|
|
|
|
|
test {
|
|
|
|
systemProperty 'jdk.attach.allowAttachSelf', true
|
|
|
|
}
|
2018-11-04 17:37:32 +01:00
|
|
|
}
|
2018-11-04 17:41:37 +01:00
|
|
|
|
2018-11-04 18:43:20 +01:00
|
|
|
|
2018-11-04 18:00:10 +01:00
|
|
|
configure(project(':seednode')) {
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
|
2022-12-14 02:41:02 +01:00
|
|
|
shadowDistTar.enabled = false
|
|
|
|
shadowDistZip.enabled = false
|
|
|
|
|
2022-12-07 17:46:26 +01:00
|
|
|
jar.manifest.attributes(
|
|
|
|
"Implementation-Title": project.name,
|
|
|
|
"Implementation-Version": version)
|
|
|
|
|
2018-11-04 18:00:10 +01:00
|
|
|
mainClassName = 'bisq.seednode.SeedNodeMain'
|
|
|
|
|
|
|
|
dependencies {
|
2021-11-12 23:29:28 +01:00
|
|
|
implementation project(':common')
|
2022-12-11 23:26:08 +01:00
|
|
|
implementation project(':proto')
|
2021-11-12 23:29:28 +01:00
|
|
|
implementation project(':p2p')
|
|
|
|
implementation project(':core')
|
2022-12-11 23:26:08 +01:00
|
|
|
implementation libs.protobuf.java
|
2022-12-09 14:45:26 +01:00
|
|
|
annotationProcessor libs.lombok
|
|
|
|
compileOnly libs.lombok
|
|
|
|
implementation libs.google.guava
|
|
|
|
implementation libs.slf4j.api
|
|
|
|
implementation(libs.google.guice) {
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
testImplementation libs.mockito
|
2018-11-04 18:00:10 +01:00
|
|
|
}
|
|
|
|
}
|
2018-11-04 18:00:56 +01:00
|
|
|
|
|
|
|
configure(project(':statsnode')) {
|
|
|
|
mainClassName = 'bisq.statistics.StatisticsMain'
|
|
|
|
|
|
|
|
dependencies {
|
2021-11-12 23:29:28 +01:00
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':p2p')
|
|
|
|
implementation project(':core')
|
2022-12-09 14:45:26 +01:00
|
|
|
annotationProcessor libs.lombok
|
|
|
|
compileOnly libs.lombok
|
|
|
|
implementation libs.slf4j.api
|
|
|
|
implementation(libs.google.guice) {
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
2018-11-04 18:00:56 +01:00
|
|
|
}
|
|
|
|
}
|
Introduce gRPC API proof of concept
This commit introduces a new `grpc` module including the following key
types:
- BisqGrpcServer: The API implementation itself, along with generated
gRPC Response/Reploy types defined in grpc/src/main/proto/grpc.proto.
- BisqGrpcServerMain: A 'headless' / daemon-like entry point for
running a Bisq node without the JavaFX desktop UI.
- BisqGrpcClient: A simple, repl-style client for the API that allows
the user to exercise the various endpoints as seen in the example
below.
In the `desktop` module, the BisqAppMain class has been modified to
start a BisqGrpcServer instance if the `--desktopWithGrpcApi` option has
been set to `true`.
In the `core` module, a new `CoreApi` class has been introduced
providing a kind of comprehensive facade for all Bisq functionality to
be exposed via the RPC API.
How to explore the proof of concept:
1. Run the main() method in BisqAppMain providing
`--desktopWithGrpcApi=true` as a program argument or alternatively, run
the main() method in BisqGrpcServerMain, where no special option is
required. In either case, you'll notice the following entry in the log
output:
INFO bisq.grpc.BisqGrpcServer: Server started, listening on 8888
2. Now run the main() method in BisqGrpcClient. Once it has started up
you are connected to the gRPC server started in step 1 above. To
exercise the API, type `getVersion` via stdin and hit return. You
should see the following response:
INFO bisq.grpc.BisqGrpcClient - 1.2.4
Likewise, you can type `getBalance` and you'll see the following
response:
INFO bisq.grpc.BisqGrpcClient - 0.00 BTC
and so forth for each of the implemented endpoints. For a list of
implemented endpoints, see BisqGrpcServer.start().
Note once again that the code here is merely a proof of concept and
should not be considered complete or production-ready in any way. In a
subsequent commit, the `--desktopWithGrpcApi` option will be disabled in
order to avoid any potential production use.
The content of this commit is the result of squashing a number of
commits originally authored by chimp1984 in the `chimp1984` fork's `grpc`
branch.
Co-authored-by: Chris Beams <chris@beams.io>
2019-09-18 18:39:37 +02:00
|
|
|
|
2020-07-09 21:15:29 +02:00
|
|
|
configure(project(':apitest')) {
|
|
|
|
mainClassName = 'bisq.apitest.ApiTestMain'
|
|
|
|
|
|
|
|
// The external dao-setup.gradle file contains tasks to install and clean dao-setup
|
|
|
|
// files downloaded from
|
|
|
|
// https://github.com/bisq-network/bisq/raw/master/docs/dao-setup.zip
|
|
|
|
// These tasks are not run by the default build, but they can can be run during
|
|
|
|
// full or partial builds, or by themselves.
|
2020-07-20 17:33:47 +02:00
|
|
|
// To run the regular clean + build + test (non api), and install dao-setup files:
|
2020-07-09 21:15:29 +02:00
|
|
|
// ./gradlew clean build :apitest:installDaoSetup
|
|
|
|
// To install or re-install dao-setup file only:
|
|
|
|
// ./gradlew :apitest:installDaoSetup -x test
|
|
|
|
// To clean installed dao-setup files:
|
|
|
|
// ./gradlew :apitest:cleanDaoSetup -x test
|
|
|
|
apply from: 'dao-setup.gradle'
|
|
|
|
|
Move test cases into subproject test sources
This change reorganizes the ':apitest' subproject to conform to a
typical gradle project, where all JUnit test cases are located in
the subproject's test sources folder. This makes running tests
from an IDE or gradle command line interface work as expected.
It will also help keep Travis CI configuration simple.
To avoid interfering in normal builds, the gradle ':apitest test' task
is disable by default; API tests will only run when a '-Dforce-true'
system property is passed to gradle.
To run API tests, run a normal build and install dao-setup files:
./gradlew clean build :apitest:installDaoSetup
Then run the tests:
./gradlew :apitest:test -Dforce=true
Try to avoid adding the '-Dforce=true' property to any other gradle
tasks, because this enables the ':apitest test' task, and would kick
off API tests before a normal build completed.
The build.gradle file was modified to support this code reorg, and
the 'org.junit.jupiter' dependendency was upgraded to v5.6.2 -- only
in the ':apitest:test' dependency definiitions, not anywhere else in
the bisq dependency definitions. The upgrade is necessary for
running ordered tests.
Since the scaffolding may be set up from either test cases (under the
test src folder), or a class under the main src folder, some changes
were made to ensure configuration paths are correct for either use
case. For example, when the 'bisq-apitest' script is run from the root
project directory, the current working directory is the root project
directory. When gradle or an IDE is used to run @Test cases, the
current working directory is :apitest subproject directory.
The main source's ApiTestMain class has been stripped down, and exists
only to keep the gradle build happy -- it needs a 'mainClassName'
property. But this main driver does have uses. See the class comments.
The other changes in this commit were made to fix style and syntax
problems.
2020-07-19 21:31:46 +02:00
|
|
|
// We have to disable the :apitest 'test' task by default because we do not want
|
|
|
|
// to interfere with normal builds. To run JUnit tests in this subproject:
|
2020-07-20 17:33:47 +02:00
|
|
|
// Run a normal build and install dao-setup files first, then run:
|
|
|
|
// 'gradle :apitest:test -DrunApiTests=true'
|
|
|
|
test.enabled = System.getProperty("runApiTests") == "true"
|
Move test cases into subproject test sources
This change reorganizes the ':apitest' subproject to conform to a
typical gradle project, where all JUnit test cases are located in
the subproject's test sources folder. This makes running tests
from an IDE or gradle command line interface work as expected.
It will also help keep Travis CI configuration simple.
To avoid interfering in normal builds, the gradle ':apitest test' task
is disable by default; API tests will only run when a '-Dforce-true'
system property is passed to gradle.
To run API tests, run a normal build and install dao-setup files:
./gradlew clean build :apitest:installDaoSetup
Then run the tests:
./gradlew :apitest:test -Dforce=true
Try to avoid adding the '-Dforce=true' property to any other gradle
tasks, because this enables the ':apitest test' task, and would kick
off API tests before a normal build completed.
The build.gradle file was modified to support this code reorg, and
the 'org.junit.jupiter' dependendency was upgraded to v5.6.2 -- only
in the ':apitest:test' dependency definiitions, not anywhere else in
the bisq dependency definitions. The upgrade is necessary for
running ordered tests.
Since the scaffolding may be set up from either test cases (under the
test src folder), or a class under the main src folder, some changes
were made to ensure configuration paths are correct for either use
case. For example, when the 'bisq-apitest' script is run from the root
project directory, the current working directory is the root project
directory. When gradle or an IDE is used to run @Test cases, the
current working directory is :apitest subproject directory.
The main source's ApiTestMain class has been stripped down, and exists
only to keep the gradle build happy -- it needs a 'mainClassName'
property. But this main driver does have uses. See the class comments.
The other changes in this commit were made to fix style and syntax
problems.
2020-07-19 21:31:46 +02:00
|
|
|
|
2020-07-09 21:15:29 +02:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
resources {
|
|
|
|
exclude 'dao-setup'
|
|
|
|
exclude 'dao-setup.zip'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Move test cases into subproject test sources
This change reorganizes the ':apitest' subproject to conform to a
typical gradle project, where all JUnit test cases are located in
the subproject's test sources folder. This makes running tests
from an IDE or gradle command line interface work as expected.
It will also help keep Travis CI configuration simple.
To avoid interfering in normal builds, the gradle ':apitest test' task
is disable by default; API tests will only run when a '-Dforce-true'
system property is passed to gradle.
To run API tests, run a normal build and install dao-setup files:
./gradlew clean build :apitest:installDaoSetup
Then run the tests:
./gradlew :apitest:test -Dforce=true
Try to avoid adding the '-Dforce=true' property to any other gradle
tasks, because this enables the ':apitest test' task, and would kick
off API tests before a normal build completed.
The build.gradle file was modified to support this code reorg, and
the 'org.junit.jupiter' dependendency was upgraded to v5.6.2 -- only
in the ':apitest:test' dependency definiitions, not anywhere else in
the bisq dependency definitions. The upgrade is necessary for
running ordered tests.
Since the scaffolding may be set up from either test cases (under the
test src folder), or a class under the main src folder, some changes
were made to ensure configuration paths are correct for either use
case. For example, when the 'bisq-apitest' script is run from the root
project directory, the current working directory is the root project
directory. When gradle or an IDE is used to run @Test cases, the
current working directory is :apitest subproject directory.
The main source's ApiTestMain class has been stripped down, and exists
only to keep the gradle build happy -- it needs a 'mainClassName'
property. But this main driver does have uses. See the class comments.
The other changes in this commit were made to fix style and syntax
problems.
2020-07-19 21:31:46 +02:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
2020-10-28 21:39:50 +01:00
|
|
|
outputs.upToDateWhen { false } // Don't use previously cached test outputs.
|
Move test cases into subproject test sources
This change reorganizes the ':apitest' subproject to conform to a
typical gradle project, where all JUnit test cases are located in
the subproject's test sources folder. This makes running tests
from an IDE or gradle command line interface work as expected.
It will also help keep Travis CI configuration simple.
To avoid interfering in normal builds, the gradle ':apitest test' task
is disable by default; API tests will only run when a '-Dforce-true'
system property is passed to gradle.
To run API tests, run a normal build and install dao-setup files:
./gradlew clean build :apitest:installDaoSetup
Then run the tests:
./gradlew :apitest:test -Dforce=true
Try to avoid adding the '-Dforce=true' property to any other gradle
tasks, because this enables the ':apitest test' task, and would kick
off API tests before a normal build completed.
The build.gradle file was modified to support this code reorg, and
the 'org.junit.jupiter' dependendency was upgraded to v5.6.2 -- only
in the ':apitest:test' dependency definiitions, not anywhere else in
the bisq dependency definitions. The upgrade is necessary for
running ordered tests.
Since the scaffolding may be set up from either test cases (under the
test src folder), or a class under the main src folder, some changes
were made to ensure configuration paths are correct for either use
case. For example, when the 'bisq-apitest' script is run from the root
project directory, the current working directory is the root project
directory. When gradle or an IDE is used to run @Test cases, the
current working directory is :apitest subproject directory.
The main source's ApiTestMain class has been stripped down, and exists
only to keep the gradle build happy -- it needs a 'mainClassName'
property. But this main driver does have uses. See the class comments.
The other changes in this commit were made to fix style and syntax
problems.
2020-07-19 21:31:46 +02:00
|
|
|
testLogging {
|
2020-10-28 21:39:50 +01:00
|
|
|
showStackTraces = true // Show full stack traces in the console.
|
|
|
|
exceptionFormat = "full"
|
|
|
|
// Show passed & failed tests, and anything printed to stderr by the tests in the console.
|
|
|
|
// Do not show skipped tests in the console; they are shown in the html report.
|
|
|
|
events "passed", "failed", "standardError"
|
|
|
|
}
|
|
|
|
|
|
|
|
afterSuite { desc, result ->
|
|
|
|
if (!desc.parent) {
|
|
|
|
println("${result.resultType} " +
|
|
|
|
"[${result.testCount} tests, " +
|
|
|
|
"${result.successfulTestCount} passed, " +
|
|
|
|
"${result.failedTestCount} failed, " +
|
|
|
|
"${result.skippedTestCount} skipped] html report contains skipped test info")
|
|
|
|
|
|
|
|
// Show report link if all tests passed in case you want to see more detail, stdout, skipped, etc.
|
2020-12-21 18:46:01 +01:00
|
|
|
if (result.resultType == TestResult.ResultType.SUCCESS) {
|
2020-10-28 21:39:50 +01:00
|
|
|
DirectoryReport htmlReport = getReports().getHtml()
|
|
|
|
String reportUrl = new org.gradle.internal.logging.ConsoleRenderer()
|
|
|
|
.asClickableFileUrl(htmlReport.getEntryPoint())
|
|
|
|
println("REPORT " + reportUrl)
|
|
|
|
}
|
|
|
|
}
|
Move test cases into subproject test sources
This change reorganizes the ':apitest' subproject to conform to a
typical gradle project, where all JUnit test cases are located in
the subproject's test sources folder. This makes running tests
from an IDE or gradle command line interface work as expected.
It will also help keep Travis CI configuration simple.
To avoid interfering in normal builds, the gradle ':apitest test' task
is disable by default; API tests will only run when a '-Dforce-true'
system property is passed to gradle.
To run API tests, run a normal build and install dao-setup files:
./gradlew clean build :apitest:installDaoSetup
Then run the tests:
./gradlew :apitest:test -Dforce=true
Try to avoid adding the '-Dforce=true' property to any other gradle
tasks, because this enables the ':apitest test' task, and would kick
off API tests before a normal build completed.
The build.gradle file was modified to support this code reorg, and
the 'org.junit.jupiter' dependendency was upgraded to v5.6.2 -- only
in the ':apitest:test' dependency definiitions, not anywhere else in
the bisq dependency definitions. The upgrade is necessary for
running ordered tests.
Since the scaffolding may be set up from either test cases (under the
test src folder), or a class under the main src folder, some changes
were made to ensure configuration paths are correct for either use
case. For example, when the 'bisq-apitest' script is run from the root
project directory, the current working directory is the root project
directory. When gradle or an IDE is used to run @Test cases, the
current working directory is :apitest subproject directory.
The main source's ApiTestMain class has been stripped down, and exists
only to keep the gradle build happy -- it needs a 'mainClassName'
property. But this main driver does have uses. See the class comments.
The other changes in this commit were made to fix style and syntax
problems.
2020-07-19 21:31:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-09 21:15:29 +02:00
|
|
|
dependencies {
|
2021-11-12 23:29:28 +01:00
|
|
|
implementation project(':proto')
|
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':core')
|
|
|
|
implementation project(':seednode')
|
|
|
|
implementation project(':desktop')
|
|
|
|
implementation project(':daemon')
|
|
|
|
implementation project(':cli')
|
2022-12-09 14:45:26 +01:00
|
|
|
annotationProcessor libs.lombok
|
|
|
|
compileOnly libs.javax.annotation
|
|
|
|
compileOnly libs.lombok
|
|
|
|
implementation libs.logback.classic
|
|
|
|
implementation libs.logback.core
|
|
|
|
implementation libs.google.gson
|
|
|
|
implementation libs.google.guava
|
|
|
|
implementation libs.protobuf.java
|
|
|
|
implementation libs.jopt
|
|
|
|
implementation libs.apache.commons.lang3
|
|
|
|
implementation libs.slf4j.api
|
|
|
|
implementation(libs.bitcoinj) {
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'bcprov-jdk15on')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'guava')
|
|
|
|
exclude(module: 'jsr305')
|
2021-11-12 23:29:28 +01:00
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'protobuf-java')
|
|
|
|
exclude(module: 'slf4j-api')
|
2021-11-12 23:29:28 +01:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.grpc.protobuf) {
|
2020-07-09 21:15:29 +02:00
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'guava')
|
2020-07-09 21:15:29 +02:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
implementation(libs.grpc.stub) {
|
2020-07-09 21:15:29 +02:00
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2021-11-13 14:45:14 +01:00
|
|
|
exclude(module: 'guava')
|
2020-07-09 21:15:29 +02:00
|
|
|
}
|
2022-12-09 14:45:26 +01:00
|
|
|
testAnnotationProcessor libs.lombok
|
|
|
|
testCompileOnly libs.lombok
|
|
|
|
testImplementation libs.junit.jupiter.api
|
|
|
|
testImplementation libs.junit.jupiter.params
|
|
|
|
testRuntimeOnly libs.javax.annotation
|
|
|
|
testRuntimeOnly(libs.junit.jupiter.engine)
|
2020-07-09 21:15:29 +02:00
|
|
|
}
|
|
|
|
}
|