Skip to content

Commit

Permalink
Merge pull request #3888 from cbeams/grpc-poc
Browse files Browse the repository at this point in the history
Introduce gRPC API proof of concept
  • Loading branch information
sqrrm authored Jan 20, 2020
2 parents fa3fcb4 + 2a66d11 commit 92466f9
Show file tree
Hide file tree
Showing 18 changed files with 1,055 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 71 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ configure(subprojects) {
fontawesomefxVersion = '8.0.0'
fontawesomefxCommonsVersion = '9.1.2'
fontawesomefxMaterialdesignfontVersion = '2.0.26-9.1.2'
grpcVersion = '1.25.0'
guavaVersion = '20.0'
guiceVersion = '4.2.2'
hamcrestVersion = '1.3'
Expand All @@ -59,7 +60,8 @@ configure(subprojects) {
lombokVersion = '1.18.2'
mockitoVersion = '3.0.0'
netlayerVersion = '0.6.5.2'
protobufVersion = '3.9.1'
protobufVersion = '3.10.0'
protocVersion = protobufVersion
pushyVersion = '0.13.2'
qrgenVersion = '1.3'
sarxosVersion = '0.3.12'
Expand All @@ -86,7 +88,9 @@ configure(subprojects) {
}


configure([project(':desktop'),
configure([project(':cli'),
project(':daemon'),
project(':desktop'),
project(':monitor'),
project(':relay'),
project(':seednode'),
Expand Down Expand Up @@ -166,7 +170,7 @@ configure(project(':common')) {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protobufVersion"
artifact = "com.google.protobuf:protoc:$protocVersion"
}
}

Expand All @@ -175,7 +179,7 @@ configure(project(':common')) {
compile "org.openjfx:javafx-base:$javafxVersion:$os"
compile "org.openjfx:javafx-graphics:$javafxVersion:$os"
compile "com.google.protobuf:protobuf-java:$protobufVersion"
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.code.gson:gson:2.8.5'
compile "org.springframework:spring-core:$springVersion"
compile "org.slf4j:slf4j-api:$slf4jVersion"
compile "ch.qos.logback:logback-core:$logbackVersion"
Expand Down Expand Up @@ -225,6 +229,8 @@ configure(project(':p2p')) {


configure(project(':core')) {
apply plugin: 'com.google.protobuf'

dependencies {
compile project(':assets')
compile project(':p2p')
Expand All @@ -250,7 +256,20 @@ configure(project(':core')) {
compile("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion") {
exclude(module: 'jackson-annotations')
}

implementation "com.google.protobuf:protobuf-java:$protobufVersion"
implementation("io.grpc:grpc-protobuf:$grpcVersion") {
exclude(module: 'guava')
exclude(module: 'animal-sniffer-annotations')
}
implementation("io.grpc:grpc-stub:$grpcVersion") {
exclude(module: 'guava')
exclude(module: 'animal-sniffer-annotations')
}
compileOnly "javax.annotation:javax.annotation-api:1.2"
runtimeOnly ("io.grpc:grpc-netty-shaded:$grpcVersion") {
exclude(module: 'guava')
exclude(module: 'animal-sniffer-annotations')
}
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"

Expand All @@ -262,11 +281,47 @@ configure(project(':core')) {
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
}

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${protocVersion}"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}

sourceSets.main.java.srcDirs += [
'build/generated/source/proto/main/grpc',
'build/generated/source/proto/main/java'
]

test {
systemProperty 'jdk.attach.allowAttachSelf', true
}
}

configure(project(':cli')) {
mainClassName = 'bisq.cli.app.BisqCliMain'

dependencies {
compile project(':core')
implementation("io.grpc:grpc-core:$grpcVersion") {
exclude(module: 'guava')
exclude(module: 'animal-sniffer-annotations')
}
implementation("io.grpc:grpc-stub:$grpcVersion") {
exclude(module: 'guava')
exclude(module: 'animal-sniffer-annotations')
}
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
}
}

configure(project(':desktop')) {
apply plugin: 'com.github.johnrengelman.shadow'
Expand Down Expand Up @@ -402,3 +457,14 @@ configure(project(':statsnode')) {
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
}
}

configure(project(':daemon')) {
mainClassName = 'bisq.daemon.app.BisqDaemonMain'

dependencies {
compile project(':core')
compileOnly "org.projectlombok:lombok:$lombokVersion"
compileOnly "javax.annotation:javax.annotation-api:1.2"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
}
}
Loading

0 comments on commit 92466f9

Please sign in to comment.