2022-10-11 23:03:13 -04:00
|
|
|
import org.apache.tools.ant.taskdefs.condition.Os
|
2023-03-21 07:07:39 -04:00
|
|
|
import org.gradle.internal.logging.ConsoleRenderer
|
2022-10-11 23:03:13 -04:00
|
|
|
|
2021-05-04 20:20:01 -04:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2022-02-06 11:36:58 -05:00
|
|
|
gradlePluginPortal()
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.17'
|
2023-03-21 07:07:39 -04:00
|
|
|
classpath 'com.google.gradle:osdetector-gradle-plugin:1.7.3'
|
|
|
|
classpath 'com.github.johnrengelman:shadow:8.1.1'
|
2022-09-19 08:59:57 -04:00
|
|
|
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.6.3'
|
2023-07-11 09:57:22 -04:00
|
|
|
classpath 'com.gradle:gradle-enterprise-gradle-plugin:3.12.4' // added for windows build verification-metadata.xml error
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(rootProject) {
|
2021-05-10 22:12:09 -04:00
|
|
|
// remove the 'haveno-*' scripts and 'lib' dir generated by the 'installDist' task
|
2021-05-04 20:20:01 -04:00
|
|
|
task clean {
|
|
|
|
doLast {
|
2021-05-10 22:12:09 -04:00
|
|
|
delete fileTree(dir: rootProject.projectDir, include: 'haveno-*'), 'lib'
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(subprojects) {
|
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'com.google.osdetector'
|
2022-01-18 14:34:27 -05:00
|
|
|
// Apply the jacoco plugin to add support for test coverage
|
|
|
|
apply plugin: 'jacoco'
|
2023-05-10 18:47:12 -04:00
|
|
|
apply plugin: 'jacoco-report-aggregation'
|
2023-03-14 15:28:47 -04:00
|
|
|
apply plugin: 'checkstyle'
|
2021-05-04 20:20:01 -04:00
|
|
|
|
2022-09-19 08:59:57 -04:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
2021-05-04 20:20:01 -04:00
|
|
|
|
|
|
|
ext { // in alphabetical order
|
|
|
|
bcVersion = '1.63'
|
|
|
|
bitcoinjVersion = '2a80db4'
|
|
|
|
codecVersion = '1.13'
|
2022-05-26 13:42:10 -04:00
|
|
|
cowwocVersion = '1.2'
|
2021-05-04 20:20:01 -04:00
|
|
|
easybindVersion = '1.0.3'
|
|
|
|
easyVersion = '4.0.1'
|
|
|
|
findbugsVersion = '3.0.2'
|
|
|
|
firebaseVersion = '6.2.0'
|
|
|
|
fontawesomefxVersion = '8.0.0'
|
|
|
|
fontawesomefxCommonsVersion = '9.1.2'
|
|
|
|
fontawesomefxMaterialdesignfontVersion = '2.0.26-9.1.2'
|
2022-09-19 08:59:57 -04:00
|
|
|
grpcVersion = '1.42.1'
|
2021-05-04 20:20:01 -04:00
|
|
|
gsonVersion = '2.8.5'
|
2023-07-11 09:57:22 -04:00
|
|
|
guavaVersion = '30.1.1-jre'
|
2023-05-10 18:47:12 -04:00
|
|
|
guiceVersion = '5.1.0'
|
2023-09-08 13:02:46 -04:00
|
|
|
moneroJavaVersion = '0.8.6'
|
2021-05-04 20:20:30 -04:00
|
|
|
httpclient5Version = '5.0'
|
2023-03-25 13:11:58 -04:00
|
|
|
hamcrestVersion = '2.2'
|
2021-05-04 20:20:01 -04:00
|
|
|
httpclientVersion = '4.5.12'
|
|
|
|
httpcoreVersion = '4.4.13'
|
|
|
|
ioVersion = '2.6'
|
|
|
|
jacksonVersion = '2.12.1'
|
2022-10-24 10:00:22 -04:00
|
|
|
javafxVersion = '16'
|
2021-05-04 20:20:01 -04:00
|
|
|
javaxAnnotationVersion = '1.2'
|
|
|
|
jcsvVersion = '1.4.0'
|
|
|
|
jetbrainsAnnotationsVersion = '13.0'
|
|
|
|
jfoenixVersion = '9.0.10'
|
|
|
|
joptVersion = '5.0.4'
|
|
|
|
jsonsimpleVersion = '1.1.1'
|
|
|
|
jsonrpc4jVersion = '1.6.0.bisq.1'
|
2023-03-25 13:11:58 -04:00
|
|
|
jupiterVersion = '5.9.2'
|
2021-05-04 20:20:01 -04:00
|
|
|
kotlinVersion = '1.3.41'
|
|
|
|
langVersion = '3.11'
|
|
|
|
logbackVersion = '1.1.11'
|
|
|
|
loggingVersion = '1.2'
|
2022-05-14 14:47:36 -04:00
|
|
|
lombokVersion = '1.18.24'
|
2023-03-21 07:07:39 -04:00
|
|
|
mockitoVersion = '5.2.0'
|
2022-09-19 08:59:57 -04:00
|
|
|
netlayerVersion = '6797461310f077bbea4f43a3a509c077b0ed8c34' // Netlayer version 0.7.3 with Tor browser version 11.0.14 and tor binary version: 0.4.7.7
|
|
|
|
protobufVersion = '3.19.1'
|
2021-05-04 20:20:01 -04:00
|
|
|
protocVersion = protobufVersion
|
|
|
|
pushyVersion = '0.13.2'
|
|
|
|
qrgenVersion = '1.3'
|
|
|
|
slf4jVersion = '1.7.30'
|
|
|
|
sparkVersion = '2.5.2'
|
|
|
|
|
|
|
|
os = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2021-05-04 20:20:30 -04:00
|
|
|
//mavenLocal()
|
2021-05-04 20:20:01 -04:00
|
|
|
maven { url 'https://jitpack.io' }
|
2021-05-04 20:20:30 -04:00
|
|
|
maven { url 'https://mvnrepository.com' }
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
}
|
2022-01-18 14:34:27 -05:00
|
|
|
|
2023-03-14 15:28:47 -04:00
|
|
|
checkstyle {
|
|
|
|
toolVersion = '10.8.1'
|
|
|
|
// https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-10.8.1/src/main/resources/google_checks.xml
|
2023-05-10 18:47:12 -04:00
|
|
|
configFile = rootProject.file("$rootDir/config/checkstyle/checkstyle.xml")
|
2023-03-21 07:07:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(Checkstyle) {
|
|
|
|
minHeapSize.set('200m')
|
|
|
|
maxHeapSize.set('1g')
|
2023-03-14 15:28:47 -04:00
|
|
|
}
|
|
|
|
|
2023-05-10 18:47:12 -04:00
|
|
|
jacoco {
|
|
|
|
toolVersion = "0.8.10"
|
|
|
|
reportsDirectory = file("$rootDir/build/reports/jacoco")
|
|
|
|
}
|
|
|
|
|
|
|
|
test.finalizedBy {
|
|
|
|
testCodeCoverageReport {
|
|
|
|
// tests are required to run before generating the report
|
|
|
|
reports {
|
|
|
|
xml.required.set(true)
|
|
|
|
html.required.set(false)
|
|
|
|
}
|
2022-01-18 14:34:27 -05:00
|
|
|
}
|
|
|
|
}
|
2023-08-11 10:21:53 -04:00
|
|
|
|
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
configure([project(':cli'),
|
|
|
|
project(':daemon'),
|
|
|
|
project(':desktop'),
|
|
|
|
project(':monitor'),
|
|
|
|
project(':relay'),
|
|
|
|
project(':seednode'),
|
|
|
|
project(':statsnode'),
|
|
|
|
project(':inventory'),
|
|
|
|
project(':apitest')]) {
|
|
|
|
|
|
|
|
apply plugin: 'application'
|
|
|
|
|
|
|
|
build.dependsOn installDist
|
|
|
|
installDist.destinationDir = file('build/app')
|
|
|
|
distZip.enabled = false
|
|
|
|
|
2021-05-10 22:12:09 -04:00
|
|
|
// the 'installDist' and 'startScripts' blocks below configure haveno executables to put
|
2021-05-04 20:20:01 -04:00
|
|
|
// generated shell scripts in the root project directory, such that users can easily
|
2021-05-10 22:12:09 -04:00
|
|
|
// discover and invoke e.g. ./haveno-desktop, ./haveno-seednode, etc.
|
2021-05-04 20:20:01 -04:00
|
|
|
// See https://stackoverflow.com/q/46327736 for details.
|
|
|
|
|
|
|
|
installDist {
|
|
|
|
doLast {
|
2021-05-10 22:12:09 -04:00
|
|
|
// copy generated shell scripts, e.g. `haveno-desktop` directly to the project
|
2021-05-04 20:20:01 -04:00
|
|
|
// root directory for discoverability and ease of use
|
|
|
|
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
|
|
|
// edit generated shell scripts such that they expect to be executed in the
|
|
|
|
// project root dir as opposed to a 'bin' subdirectory
|
2021-05-10 22:12:09 -04:00
|
|
|
def windowsScriptFile = file("${rootProject.projectDir}/haveno-${applicationName}.bat")
|
2021-05-04 20:20:01 -04:00
|
|
|
windowsScriptFile.text = windowsScriptFile.text.replace(
|
|
|
|
'set APP_HOME=%DIRNAME%..', 'set APP_HOME=%DIRNAME%')
|
|
|
|
|
2021-05-10 22:12:09 -04:00
|
|
|
def unixScriptFile = file("${rootProject.projectDir}/haveno-$applicationName")
|
2021-05-04 20:20:01 -04:00
|
|
|
unixScriptFile.text = unixScriptFile.text.replace(
|
2022-09-19 08:59:57 -04:00
|
|
|
'APP_HOME=$( cd "${APP_HOME:-./}.." && pwd -P ) || exit', 'APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit')
|
2021-05-04 20:20:01 -04:00
|
|
|
|
|
|
|
if (applicationName == 'desktop') {
|
2021-05-10 22:12:09 -04:00
|
|
|
def script = file("${rootProject.projectDir}/haveno-$applicationName")
|
2021-05-04 20:20:01 -04:00
|
|
|
script.text = script.text.replace(
|
|
|
|
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-XX:MaxRAM=4g"')
|
|
|
|
}
|
|
|
|
|
|
|
|
if (applicationName == 'apitest') {
|
|
|
|
// 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).
|
2021-05-10 22:12:09 -04:00
|
|
|
def script = file("${rootProject.projectDir}/haveno-$applicationName")
|
2021-05-04 20:20:01 -04:00
|
|
|
script.text = script.text.replace(
|
|
|
|
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="' +
|
|
|
|
'-Dlogback.configurationFile=apitest/build/resources/main/logback.xml"')
|
|
|
|
}
|
|
|
|
|
|
|
|
if (osdetector.os != 'windows')
|
2021-05-10 22:12:09 -04:00
|
|
|
delete fileTree(dir: rootProject.projectDir, include: 'haveno-*.bat')
|
2021-05-04 20:20:01 -04:00
|
|
|
else
|
2021-05-10 22:12:09 -04:00
|
|
|
delete fileTree(dir: rootProject.projectDir, include: 'haveno-*', exclude: '*.bat')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
startScripts {
|
2021-05-10 22:12:09 -04:00
|
|
|
// rename scripts from, e.g. `desktop` to `haveno-desktop`
|
|
|
|
applicationName = "haveno-$applicationName"
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(project(':proto')) {
|
|
|
|
apply plugin: 'com.google.protobuf'
|
|
|
|
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
|
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
implementation "ch.qos.logback:logback-core:$logbackVersion"
|
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
implementation("io.grpc:grpc-protobuf:$grpcVersion") {
|
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'guava')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
implementation("io.grpc:grpc-stub:$grpcVersion") {
|
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'guava')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets.main.java.srcDirs += [
|
|
|
|
'build/generated/source/proto/main/grpc',
|
|
|
|
'build/generated/source/proto/main/java'
|
|
|
|
]
|
|
|
|
|
|
|
|
protobuf {
|
|
|
|
protoc {
|
|
|
|
artifact = "com.google.protobuf:protoc:${protocVersion}"
|
|
|
|
}
|
|
|
|
plugins {
|
|
|
|
grpc {
|
|
|
|
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
generateProtoTasks {
|
|
|
|
all()*.plugins { grpc {} }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(project(':assets')) {
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation("com.github.bisq-network:bitcoinj:$bitcoinjVersion") {
|
2021-05-04 20:20:01 -04:00
|
|
|
exclude(module: 'bcprov-jdk15on')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'guava')
|
|
|
|
exclude(module: 'jsr305')
|
2021-05-04 20:20:01 -04:00
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'protobuf-java')
|
|
|
|
exclude(module: 'slf4j-api')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
|
|
|
implementation "org.apache.commons:commons-lang3:$langVersion"
|
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
2023-03-25 13:11:58 -04:00
|
|
|
testImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
configure(project(':common')) {
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':proto')
|
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
|
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
implementation "ch.qos.logback:logback-core:$logbackVersion"
|
|
|
|
implementation("com.github.bisq-network:bitcoinj:$bitcoinjVersion") {
|
2021-05-04 20:20:01 -04:00
|
|
|
exclude(module: 'jsr305')
|
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
exclude(module: 'guava')
|
|
|
|
exclude(module: 'protobuf-java')
|
|
|
|
exclude(module: 'bcprov-jdk15on')
|
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
|
|
|
}
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation "com.google.code.findbugs:jsr305:$findbugsVersion"
|
|
|
|
implementation "com.google.code.gson:gson:$gsonVersion"
|
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
|
|
|
implementation("com.google.inject:guice:$guiceVersion") {
|
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
|
|
|
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
|
|
|
|
implementation "commons-io:commons-io:$ioVersion"
|
|
|
|
implementation "net.sf.jopt-simple:jopt-simple:$joptVersion"
|
|
|
|
implementation "org.apache.commons:commons-lang3:$langVersion"
|
|
|
|
implementation "org.bouncycastle:bcpg-jdk15on:$bcVersion"
|
|
|
|
implementation "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"
|
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
2023-03-25 13:11:58 -04:00
|
|
|
testImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
runtimeOnly("io.grpc:grpc-netty-shaded:$grpcVersion") {
|
|
|
|
exclude(module: 'guava')
|
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
|
|
|
}
|
2022-01-15 15:46:03 -05:00
|
|
|
|
2022-02-06 11:36:58 -05:00
|
|
|
// override transitive dependency version from 1.5 to the same version just identified by commit number.
|
2022-01-15 15:46:03 -05:00
|
|
|
// Remove this if transitive dependency is changed to something else than 1.5
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation(group: 'com.github.JesusMcCloud', name: 'jtorctl') { version { strictly "[9b5ba2036b]" } }
|
|
|
|
implementation "org.openjfx:javafx-base:$javafxVersion:$os"
|
|
|
|
implementation "org.openjfx:javafx-graphics:$javafxVersion:$os"
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(project(':p2p')) {
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':proto')
|
|
|
|
implementation project(':common')
|
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
|
|
|
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
|
|
|
|
implementation "org.fxmisc.easybind:easybind:$easybindVersion"
|
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
|
|
|
implementation("com.github.bisq-network.netlayer:tor.external:$netlayerVersion") {
|
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
|
|
|
implementation("com.github.bisq-network.netlayer:tor.native:$netlayerVersion") {
|
2021-05-04 20:20:01 -04:00
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation("com.github.bisq-network:bitcoinj:$bitcoinjVersion") {
|
|
|
|
exclude(module: 'bcprov-jdk15on')
|
|
|
|
exclude(module: 'guava')
|
|
|
|
exclude(module: 'jsr305')
|
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
|
|
|
exclude(module: 'protobuf-java')
|
2021-05-04 20:20:01 -04:00
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation("com.google.inject:guice:$guiceVersion") {
|
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
2021-05-04 20:20:01 -04:00
|
|
|
implementation("org.apache.httpcomponents:httpclient:$httpclientVersion") {
|
|
|
|
exclude(module: 'commons-codec')
|
|
|
|
}
|
|
|
|
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
|
2023-03-25 13:11:58 -04:00
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-params:$jupiterVersion"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
testImplementation "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
testImplementation "ch.qos.logback:logback-core:$logbackVersion"
|
|
|
|
testImplementation "org.apache.commons:commons-lang3:$langVersion"
|
|
|
|
testImplementation("org.mockito:mockito-core:$mockitoVersion")
|
|
|
|
|
|
|
|
implementation "org.openjfx:javafx-base:$javafxVersion:$os"
|
|
|
|
implementation "org.openjfx:javafx-graphics:$javafxVersion:$os"
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(project(':core')) {
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':proto')
|
|
|
|
implementation project(':assets')
|
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':p2p')
|
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
|
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
implementation "ch.qos.logback:logback-core:$logbackVersion"
|
|
|
|
implementation "com.fasterxml.jackson.core:jackson-core:$jacksonVersion"
|
|
|
|
implementation "com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion"
|
|
|
|
implementation "com.google.code.findbugs:jsr305:$findbugsVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
implementation "com.google.code.gson:gson:$gsonVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
|
|
|
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
|
|
|
|
implementation "commons-codec:commons-codec:$codecVersion"
|
|
|
|
implementation "commons-io:commons-io:$ioVersion"
|
|
|
|
implementation "net.sf.jopt-simple:jopt-simple:$joptVersion"
|
|
|
|
implementation "org.apache.commons:commons-lang3:$langVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
implementation "org.apache.httpcomponents:httpcore:$httpcoreVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation "org.fxmisc.easybind:easybind:$easybindVersion"
|
|
|
|
implementation "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"
|
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
|
|
|
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion") {
|
|
|
|
exclude(module: 'jackson-annotations')
|
|
|
|
}
|
|
|
|
implementation("com.github.bisq-network.netlayer:tor.native:$netlayerVersion") {
|
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
|
|
|
implementation("com.github.bisq-network.netlayer:tor.external:$netlayerVersion") {
|
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
|
|
|
implementation("com.github.bisq-network:bitcoinj:$bitcoinjVersion") {
|
|
|
|
exclude(module: 'bcprov-jdk15on')
|
|
|
|
exclude(module: 'guava')
|
|
|
|
exclude(module: 'jsr305')
|
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
|
|
|
exclude(module: 'protobuf-java')
|
|
|
|
exclude(module: 'slf4j-api')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation("com.github.bisq-network:jsonrpc4j:$jsonrpc4jVersion") {
|
2021-05-04 20:20:01 -04:00
|
|
|
exclude(module: 'base64')
|
|
|
|
exclude(module: 'httpcore-nio')
|
|
|
|
}
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation("com.google.inject:guice:$guiceVersion") {
|
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
|
|
|
implementation("org.apache.httpcomponents:httpclient:$httpclientVersion") {
|
|
|
|
exclude(module: 'commons-codec')
|
2021-07-23 09:55:21 -04:00
|
|
|
}
|
2022-09-19 08:59:57 -04:00
|
|
|
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
testImplementation "com.natpryce:make-it-easy:$easyVersion"
|
2023-03-25 13:11:58 -04:00
|
|
|
testImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
testImplementation "org.mockito:mockito-core:$mockitoVersion"
|
|
|
|
|
|
|
|
implementation "org.openjfx:javafx-base:$javafxVersion:$os"
|
|
|
|
implementation "org.openjfx:javafx-graphics:$javafxVersion:$os"
|
|
|
|
implementation("io.github.monero-ecosystem:monero-java:$moneroJavaVersion") {
|
2021-05-04 20:20:30 -04:00
|
|
|
exclude(module: 'jackson-core')
|
|
|
|
exclude(module: 'jackson-annotations')
|
|
|
|
exclude(module: 'jackson-databind')
|
|
|
|
exclude(module: 'bcprov-jdk15on')
|
2022-02-06 11:36:58 -05:00
|
|
|
exclude(group: 'org.slf4j', module: 'slf4j-simple')
|
2021-05-04 20:20:30 -04:00
|
|
|
}
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
systemProperty 'jdk.attach.allowAttachSelf', true
|
|
|
|
}
|
2022-02-06 11:37:47 -05:00
|
|
|
|
2022-10-11 23:03:13 -04:00
|
|
|
task havenoDeps {
|
|
|
|
doLast {
|
|
|
|
// get monero binaries download url
|
|
|
|
Map moneroBinaries = [
|
2023-07-25 08:19:17 -04:00
|
|
|
'linux' : 'https://github.com/haveno-dex/monero/releases/download/testing13/monero-bins-haveno-linux.tar.gz',
|
|
|
|
'linux-sha256' : 'eac55092b97162854f2a94f7895d52cf4a20eba0a55a1769ce053060d6be6195',
|
|
|
|
'mac' : 'https://github.com/haveno-dex/monero/releases/download/testing13/monero-bins-haveno-mac.tar.gz',
|
|
|
|
'mac-sha256' : 'e7bf40ef35cb278649c63f8651cee6124d4a5e97448dfa407b193572ebd85fb6',
|
|
|
|
'windows' : 'https://github.com/haveno-dex/monero/releases/download/testing13/monero-bins-haveno-windows.zip',
|
|
|
|
'windows-sha256': 'f7da08d793041103c069b23229040fc4f9632009317b84d201f63f477d3ca3dd'
|
2022-10-11 23:03:13 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
String osKey
|
|
|
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
|
|
osKey = 'windows'
|
|
|
|
} else if (Os.isFamily(Os.FAMILY_MAC)) {
|
|
|
|
osKey = 'mac'
|
|
|
|
} else {
|
|
|
|
osKey = 'linux'
|
|
|
|
}
|
|
|
|
|
|
|
|
String moneroDownloadUrl = moneroBinaries[osKey]
|
|
|
|
String moneroSHA256Hash = moneroBinaries[osKey + '-sha256']
|
|
|
|
String moneroArchiveFileName = moneroDownloadUrl.tokenize('/').last()
|
|
|
|
String localnetDirName = '.localnet'
|
|
|
|
File localnetDir = new File(project.rootDir, localnetDirName)
|
|
|
|
localnetDir.mkdirs()
|
|
|
|
File moneroArchiveFile = new File(localnetDir, moneroArchiveFileName)
|
|
|
|
ext.downloadAndVerifyDependencies(moneroDownloadUrl, moneroSHA256Hash, moneroArchiveFile)
|
|
|
|
|
|
|
|
// extract if dependencies are missing or if archive was updated
|
|
|
|
File monerodFile
|
|
|
|
File moneroRpcFile
|
|
|
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
|
|
monerodFile = new File(localnetDir, 'monerod.exe')
|
|
|
|
moneroRpcFile = new File(localnetDir, 'monero-wallet-rpc.exe')
|
|
|
|
} else {
|
|
|
|
monerodFile = new File(localnetDir, 'monerod')
|
|
|
|
moneroRpcFile = new File(localnetDir, 'monero-wallet-rpc')
|
|
|
|
}
|
|
|
|
if (ext.dependencyDownloadedAndVerified || !monerodFile.exists() || !moneroRpcFile.exists()) {
|
|
|
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
|
|
ext.extractArchiveZip(moneroArchiveFile, localnetDir)
|
|
|
|
} else {
|
|
|
|
ext.extractArchiveTarGz(moneroArchiveFile, localnetDir)
|
|
|
|
}
|
|
|
|
|
|
|
|
// add the current platform's monero dependencies into the resources folder for installation
|
|
|
|
copy {
|
|
|
|
from "${monerodFile}"
|
|
|
|
into "${project(':core').projectDir}/src/main/resources/bin"
|
|
|
|
}
|
|
|
|
copy {
|
|
|
|
from "${moneroRpcFile}"
|
|
|
|
into "${project(':core').projectDir}/src/main/resources/bin"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ext.extractArchiveTarGz = { File tarGzFile, File destinationDir ->
|
|
|
|
println "Extracting tar.gz ${tarGzFile}"
|
|
|
|
// Gradle's tar extraction preserves permissions (crucial for jpackage to function correctly)
|
|
|
|
copy {
|
|
|
|
from tarTree(resources.gzip(tarGzFile))
|
|
|
|
into destinationDir
|
|
|
|
}
|
|
|
|
println "Extracted to ${destinationDir}"
|
|
|
|
}
|
|
|
|
|
|
|
|
ext.extractArchiveZip = { File zipFile, File destinationDir ->
|
|
|
|
println "Extracting zip ${zipFile}..."
|
|
|
|
ant.unzip(src: zipFile, dest: destinationDir)
|
|
|
|
println "Extracted to ${destinationDir}"
|
|
|
|
}
|
|
|
|
|
|
|
|
ext.downloadAndVerifyDependencies = { String archiveURL, String archiveSHA256, File destinationArchiveFile ->
|
|
|
|
ext.dependencyDownloadedAndVerified = false
|
|
|
|
// if archive exists, check to see if its already up to date
|
|
|
|
if (destinationArchiveFile.exists()) {
|
|
|
|
println "Verifying existing archive ${destinationArchiveFile}"
|
|
|
|
ant.archiveHash = archiveSHA256
|
|
|
|
ant.checksum(file: destinationArchiveFile, algorithm: 'SHA-256', property: '${archiveHash}', verifyProperty: 'existingHashMatches')
|
|
|
|
if (ant.properties['existingHashMatches'] != 'true') {
|
|
|
|
println "Existing archive does not match hash ${archiveSHA256}"
|
|
|
|
} else {
|
|
|
|
println "Existing archive matches hash"
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
println "Downloading ${archiveURL}"
|
|
|
|
ant.get(src: archiveURL, dest: destinationArchiveFile)
|
|
|
|
println 'Download saved to ' + destinationArchiveFile
|
|
|
|
|
|
|
|
println 'Verifying checksum for downloaded binary ...'
|
|
|
|
ant.archiveHash = archiveSHA256
|
|
|
|
// use a different verifyProperty name from existing verification or it will always fail
|
|
|
|
ant.checksum(file: destinationArchiveFile, algorithm: 'SHA-256', property: '${archiveHash}', verifyProperty: 'downloadedHashMatches')
|
|
|
|
if (ant.properties['downloadedHashMatches'] != 'true') {
|
|
|
|
ant.fail('Checksum mismatch: Downloaded archive has a different checksum than expected')
|
|
|
|
}
|
|
|
|
println 'Checksum verified'
|
|
|
|
ext.dependencyDownloadedAndVerified = true
|
|
|
|
}
|
2022-02-06 11:37:47 -05:00
|
|
|
}
|
2022-10-11 23:03:13 -04:00
|
|
|
|
|
|
|
processResources.dependsOn havenoDeps // before both test and build
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
configure(project(':cli')) {
|
2023-03-06 19:14:00 -05:00
|
|
|
mainClassName = 'haveno.cli.CliMain'
|
2021-05-04 20:20:01 -04:00
|
|
|
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':proto')
|
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
implementation "ch.qos.logback:logback-core:$logbackVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
|
|
|
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation "net.sf.jopt-simple:jopt-simple:$joptVersion"
|
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
implementation("io.grpc:grpc-core:$grpcVersion") {
|
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'guava')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
implementation("io.grpc:grpc-stub:$grpcVersion") {
|
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'guava')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
runtimeOnly("io.grpc:grpc-netty-shaded:$grpcVersion") {
|
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'guava')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
|
2022-05-26 13:42:10 -04:00
|
|
|
testImplementation "org.bitbucket.cowwoc:diff-match-patch:$cowwocVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-params:$jupiterVersion"
|
|
|
|
testRuntimeOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
|
2023-03-25 13:11:58 -04:00
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(project(':desktop')) {
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
apply from: 'package/package.gradle'
|
|
|
|
|
2023-09-11 06:06:10 -04:00
|
|
|
version = '1.0.11-SNAPSHOT'
|
2021-05-04 20:20:01 -04:00
|
|
|
|
|
|
|
jar.manifest.attributes(
|
|
|
|
"Implementation-Title": project.name,
|
2023-06-15 12:42:58 -04:00
|
|
|
"Implementation-Version": version,
|
|
|
|
"CFBundleVersion": version)
|
2021-05-04 20:20:01 -04:00
|
|
|
|
2023-03-06 19:14:00 -05:00
|
|
|
mainClassName = 'haveno.desktop.app.HavenoAppMain'
|
2021-05-04 20:20:01 -04:00
|
|
|
|
|
|
|
tasks.withType(AbstractArchiveTask) {
|
|
|
|
preserveFileTimestamps = false
|
|
|
|
reproducibleFileOrder = true
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets.main.resources.srcDirs += ['src/main/java'] // to copy fxml and css files
|
|
|
|
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':assets')
|
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':proto')
|
|
|
|
implementation project(':p2p')
|
|
|
|
implementation project(':core')
|
2021-05-04 20:20:01 -04:00
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
implementation "ch.qos.logback:logback-core:$logbackVersion"
|
|
|
|
implementation "com.google.code.gson:gson:$gsonVersion"
|
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
|
|
|
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
|
|
|
|
implementation "com.googlecode.jcsv:jcsv:$jcsvVersion"
|
|
|
|
implementation "com.jfoenix:jfoenix:$jfoenixVersion"
|
|
|
|
implementation "commons-io:commons-io:$ioVersion"
|
|
|
|
implementation "de.jensd:fontawesomefx-commons:$fontawesomefxCommonsVersion"
|
|
|
|
implementation "de.jensd:fontawesomefx-materialdesignfont:$fontawesomefxMaterialdesignfontVersion"
|
|
|
|
implementation "de.jensd:fontawesomefx:$fontawesomefxVersion"
|
|
|
|
implementation "net.glxn:qrgen:$qrgenVersion"
|
|
|
|
implementation "org.apache.commons:commons-lang3:$langVersion"
|
|
|
|
implementation "org.bouncycastle:bcpg-jdk15on:$bcVersion"
|
|
|
|
implementation "org.fxmisc.easybind:easybind:$easybindVersion"
|
|
|
|
implementation "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"
|
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
|
|
|
implementation("com.github.bisq-network:bitcoinj:$bitcoinjVersion") {
|
|
|
|
exclude(module: 'bcprov-jdk15on')
|
|
|
|
exclude(module: 'guava')
|
|
|
|
exclude(module: 'jsr305')
|
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
|
|
|
exclude(module: 'protobuf-java')
|
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
|
|
|
implementation("com.google.inject:guice:$guiceVersion") {
|
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
2021-05-04 20:20:01 -04:00
|
|
|
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
testImplementation "com.natpryce:make-it-easy:$easyVersion"
|
|
|
|
testImplementation "org.mockito:mockito-core:$mockitoVersion"
|
2023-03-25 13:11:58 -04:00
|
|
|
testImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
|
|
|
|
implementation("io.github.monero-ecosystem:monero-java:$moneroJavaVersion") {
|
|
|
|
exclude(module: 'jackson-core')
|
|
|
|
exclude(module: 'jackson-annotations')
|
|
|
|
exclude(module: 'jackson-databind')
|
|
|
|
exclude(module: 'bcprov-jdk15on')
|
|
|
|
exclude(group: 'org.slf4j', module: 'slf4j-simple')
|
|
|
|
}
|
|
|
|
implementation "org.openjfx:javafx-controls:$javafxVersion:$os"
|
|
|
|
implementation "org.openjfx:javafx-fxml:$javafxVersion:$os"
|
|
|
|
implementation "org.openjfx:javafx-swing:$javafxVersion:$os"
|
|
|
|
implementation "org.openjfx:javafx-base:$javafxVersion:$os"
|
|
|
|
implementation "org.openjfx:javafx-graphics:$javafxVersion:$os"
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
systemProperty 'jdk.attach.allowAttachSelf', true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
configure(project(':monitor')) {
|
2023-03-06 19:14:00 -05:00
|
|
|
mainClassName = 'haveno.monitor.Monitor'
|
2021-05-04 20:20:01 -04:00
|
|
|
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':assets')
|
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':core')
|
|
|
|
implementation project(':p2p')
|
2021-05-04 20:20:01 -04:00
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
implementation "ch.qos.logback:logback-core:$logbackVersion"
|
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
|
|
|
implementation("com.github.bisq-network.netlayer:tor.external:$netlayerVersion") {
|
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
|
|
|
implementation("com.github.bisq-network.netlayer:tor.native:$netlayerVersion") {
|
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
|
|
|
implementation("com.google.inject:guice:$guiceVersion") {
|
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
2021-05-04 20:20:01 -04:00
|
|
|
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-params:$jupiterVersion"
|
2023-03-25 13:11:58 -04:00
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
|
|
|
|
implementation "org.openjfx:javafx-base:$javafxVersion:$os"
|
|
|
|
implementation "org.openjfx:javafx-graphics:$javafxVersion:$os"
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
configure(project(':relay')) {
|
2023-03-06 19:14:00 -05:00
|
|
|
mainClassName = 'haveno.relay.RelayMain'
|
2021-05-04 20:20:01 -04:00
|
|
|
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':common')
|
|
|
|
implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
implementation "ch.qos.logback:logback-core:$logbackVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
implementation("com.google.firebase:firebase-admin:$firebaseVersion") {
|
|
|
|
exclude(module: 'commons-logging')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'grpc-auth')
|
2021-05-04 20:20:01 -04:00
|
|
|
exclude(module: 'httpclient')
|
|
|
|
exclude(module: 'httpcore')
|
|
|
|
}
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation "com.sparkjava:spark-core:$sparkVersion"
|
|
|
|
implementation "com.turo:pushy:$pushyVersion"
|
|
|
|
implementation "commons-codec:commons-codec:$codecVersion"
|
|
|
|
implementation "io.grpc:grpc-auth:$grpcVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
configure(project(':seednode')) {
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
|
2023-03-06 19:14:00 -05:00
|
|
|
mainClassName = 'haveno.seednode.SeedNodeMain'
|
2021-05-04 20:20:01 -04:00
|
|
|
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':p2p')
|
|
|
|
implementation project(':core')
|
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
|
|
|
implementation("com.google.inject:guice:$guiceVersion") {
|
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
|
|
|
testImplementation "org.mockito:mockito-core:$mockitoVersion"
|
2023-03-25 13:11:58 -04:00
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
configure(project(':statsnode')) {
|
2023-03-06 19:14:00 -05:00
|
|
|
mainClassName = 'haveno.statistics.StatisticsMain'
|
2021-05-04 20:20:01 -04:00
|
|
|
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':p2p')
|
|
|
|
implementation project(':core')
|
2021-05-04 20:20:01 -04:00
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
|
|
|
implementation("com.google.inject:guice:$guiceVersion") {
|
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(project(':daemon')) {
|
2023-03-06 19:14:00 -05:00
|
|
|
mainClassName = 'haveno.daemon.app.HavenoDaemonMain'
|
2021-05-04 20:20:01 -04:00
|
|
|
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':proto')
|
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':p2p')
|
|
|
|
implementation project(':core')
|
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
|
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
implementation "ch.qos.logback:logback-core:$logbackVersion"
|
|
|
|
implementation "com.google.code.gson:gson:$gsonVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
|
|
|
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation "org.apache.commons:commons-lang3:$langVersion"
|
|
|
|
implementation "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"
|
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
|
|
|
implementation("com.github.bisq-network:bitcoinj:$bitcoinjVersion") {
|
|
|
|
exclude(module: 'bcprov-jdk15on')
|
2021-05-04 20:20:01 -04:00
|
|
|
exclude(module: 'guava')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'jsr305')
|
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
|
|
|
exclude(module: 'protobuf-java')
|
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
|
|
|
implementation("com.google.inject:guice:$guiceVersion") {
|
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
|
|
|
implementation("io.grpc:grpc-protobuf:$grpcVersion") {
|
2021-05-04 20:20:01 -04:00
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'guava')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
implementation("io.grpc:grpc-stub:$grpcVersion") {
|
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'guava')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
runtimeOnly("io.grpc:grpc-netty-shaded:$grpcVersion") {
|
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'guava')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-params:$jupiterVersion"
|
|
|
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jupiterVersion")
|
|
|
|
|
|
|
|
implementation("io.github.monero-ecosystem:monero-java:$moneroJavaVersion") {
|
|
|
|
exclude(module: 'jackson-core')
|
|
|
|
exclude(module: 'jackson-annotations')
|
|
|
|
exclude(module: 'jackson-databind')
|
|
|
|
exclude(module: 'bcprov-jdk15on')
|
|
|
|
exclude(group: 'org.slf4j', module: 'slf4j-simple')
|
|
|
|
}
|
|
|
|
implementation "org.openjfx:javafx-base:$javafxVersion:$os"
|
|
|
|
implementation "org.openjfx:javafx-graphics:$javafxVersion:$os"
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(project(':inventory')) {
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
|
2023-03-06 19:14:00 -05:00
|
|
|
mainClassName = 'haveno.inventory.InventoryMonitorMain'
|
2021-05-04 20:20:01 -04:00
|
|
|
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':p2p')
|
|
|
|
implementation project(':core')
|
2021-05-04 20:20:01 -04:00
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
implementation "ch.qos.logback:logback-core:$logbackVersion"
|
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
|
|
|
implementation "com.sparkjava:spark-core:$sparkVersion"
|
|
|
|
implementation "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"
|
|
|
|
implementation("com.google.inject:guice:$guiceVersion") {
|
|
|
|
exclude(module: 'guava')
|
|
|
|
}
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(project(':apitest')) {
|
2023-03-06 19:14:00 -05:00
|
|
|
mainClassName = 'haveno.apitest.ApiTestMain'
|
2021-05-04 20:20:01 -04: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:
|
|
|
|
// Run a normal build and install dao-setup files first, then run:
|
|
|
|
// 'gradle :apitest:test -DrunApiTests=true'
|
|
|
|
test.enabled = System.getProperty("runApiTests") == "true"
|
|
|
|
|
|
|
|
test {
|
|
|
|
outputs.upToDateWhen { false } // Don't use previously cached test outputs.
|
|
|
|
testLogging {
|
|
|
|
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.
|
|
|
|
if (result.resultType == TestResult.ResultType.SUCCESS) {
|
|
|
|
DirectoryReport htmlReport = getReports().getHtml()
|
2023-03-21 07:07:39 -04:00
|
|
|
String reportUrl = new ConsoleRenderer()
|
2021-05-04 20:20:01 -04:00
|
|
|
.asClickableFileUrl(htmlReport.getEntryPoint())
|
|
|
|
println("REPORT " + reportUrl)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation project(':proto')
|
|
|
|
implementation project(':common')
|
|
|
|
implementation project(':core')
|
|
|
|
implementation project(':seednode')
|
|
|
|
implementation project(':desktop')
|
|
|
|
implementation project(':daemon')
|
|
|
|
implementation project(':cli')
|
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
|
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
implementation "ch.qos.logback:logback-core:$logbackVersion"
|
|
|
|
implementation "com.google.code.gson:gson:$gsonVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
implementation "com.google.guava:guava:$guavaVersion"
|
|
|
|
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
implementation "net.sf.jopt-simple:jopt-simple:$joptVersion"
|
|
|
|
implementation "org.apache.commons:commons-lang3:$langVersion"
|
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
|
|
|
implementation("com.github.bisq-network:bitcoinj:$bitcoinjVersion") {
|
|
|
|
exclude(module: 'bcprov-jdk15on')
|
2021-05-04 20:20:01 -04:00
|
|
|
exclude(module: 'guava')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'jsr305')
|
|
|
|
exclude(module: 'okhttp')
|
|
|
|
exclude(module: 'okio')
|
|
|
|
exclude(module: 'protobuf-java')
|
|
|
|
exclude(module: 'slf4j-api')
|
|
|
|
}
|
|
|
|
implementation("io.grpc:grpc-protobuf:$grpcVersion") {
|
2021-05-04 20:20:01 -04:00
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'guava')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
implementation("io.grpc:grpc-stub:$grpcVersion") {
|
|
|
|
exclude(module: 'animal-sniffer-annotations')
|
2022-09-19 08:59:57 -04:00
|
|
|
exclude(module: 'guava')
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
2022-09-19 08:59:57 -04:00
|
|
|
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-params:$jupiterVersion"
|
2022-09-19 08:59:57 -04:00
|
|
|
testRuntimeOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
|
2023-03-25 13:11:58 -04:00
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion"
|
2021-05-04 20:20:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|