Skip to content

Commit

Permalink
Rename :protodefintion subproject to :proto
Browse files Browse the repository at this point in the history
This is done primarily for concision. This change also repackages
bisq.grpc => bisq.proto.grpc in anticipation of repackaging the
definitions in pb.proto from 'protobuf' to 'bisq.proto'. There should
not be any compatibility issues with doing this, but it's out of scope
here. When complete, the relationship between bisq.proto.grpc and
bisq.proto will be more intuitively clear, i.e. that bisq.proto.grpc has
certain dependencies on bisq.proto classes, but not the other way
around.
  • Loading branch information
cbeams committed Mar 26, 2020
1 parent b8db1cd commit ccde089
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 38 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.

8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ configure([project(':cli'),
}
}

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

dependencies {
Expand Down Expand Up @@ -214,7 +214,7 @@ configure(project(':assets')) {

configure(project(':common')) {
dependencies {
compile project(':protodefinition')
compile project(':proto')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
compile "org.openjfx:javafx-base:$javafxVersion:$os"
compile "org.openjfx:javafx-graphics:$javafxVersion:$os"
Expand Down Expand Up @@ -274,7 +274,7 @@ configure(project(':p2p')) {

configure(project(':core')) {
dependencies {
compile project(':protodefinition')
compile project(':proto')
compile project(':assets')
compile project(':p2p')
implementation "commons-codec:commons-codec:$codecVersion"
Expand Down Expand Up @@ -336,7 +336,7 @@ configure(project(':cli')) {
mainClassName = 'bisq.cli.app.BisqCliMain'

dependencies {
compile project(':protodefinition')
compile project(':proto')
implementation "com.google.guava:guava:$guavaVersion"
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
implementation("io.grpc:grpc-core:$grpcVersion") {
Expand Down
12 changes: 6 additions & 6 deletions cli/src/main/java/bisq/cli/app/CliCommand.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package bisq.cli.app;

import bisq.grpc.GetBalanceGrpc;
import bisq.grpc.GetBalanceRequest;
import bisq.grpc.GetVersionGrpc;
import bisq.grpc.GetVersionRequest;
import bisq.grpc.StopServerGrpc;
import bisq.grpc.StopServerRequest;
import bisq.proto.grpc.GetBalanceGrpc;
import bisq.proto.grpc.GetBalanceRequest;
import bisq.proto.grpc.GetVersionGrpc;
import bisq.proto.grpc.GetVersionRequest;
import bisq.proto.grpc.StopServerGrpc;
import bisq.proto.grpc.StopServerRequest;

import io.grpc.ManagedChannel;
import io.grpc.StatusRuntimeException;
Expand Down
42 changes: 21 additions & 21 deletions core/src/main/java/bisq/core/grpc/BisqGrpcServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@
import bisq.core.trade.handlers.TransactionResultHandler;
import bisq.core.trade.statistics.TradeStatistics2;

import bisq.grpc.GetBalanceGrpc;
import bisq.grpc.GetBalanceReply;
import bisq.grpc.GetBalanceRequest;
import bisq.grpc.GetOffersGrpc;
import bisq.grpc.GetOffersReply;
import bisq.grpc.GetOffersRequest;
import bisq.grpc.GetPaymentAccountsGrpc;
import bisq.grpc.GetPaymentAccountsReply;
import bisq.grpc.GetPaymentAccountsRequest;
import bisq.grpc.GetTradeStatisticsGrpc;
import bisq.grpc.GetTradeStatisticsReply;
import bisq.grpc.GetTradeStatisticsRequest;
import bisq.grpc.GetVersionGrpc;
import bisq.grpc.GetVersionReply;
import bisq.grpc.GetVersionRequest;
import bisq.grpc.PlaceOfferGrpc;
import bisq.grpc.PlaceOfferReply;
import bisq.grpc.PlaceOfferRequest;
import bisq.grpc.StopServerGrpc;
import bisq.grpc.StopServerReply;
import bisq.grpc.StopServerRequest;
import bisq.proto.grpc.GetBalanceGrpc;
import bisq.proto.grpc.GetBalanceReply;
import bisq.proto.grpc.GetBalanceRequest;
import bisq.proto.grpc.GetOffersGrpc;
import bisq.proto.grpc.GetOffersReply;
import bisq.proto.grpc.GetOffersRequest;
import bisq.proto.grpc.GetPaymentAccountsGrpc;
import bisq.proto.grpc.GetPaymentAccountsReply;
import bisq.proto.grpc.GetPaymentAccountsRequest;
import bisq.proto.grpc.GetTradeStatisticsGrpc;
import bisq.proto.grpc.GetTradeStatisticsReply;
import bisq.proto.grpc.GetTradeStatisticsRequest;
import bisq.proto.grpc.GetVersionGrpc;
import bisq.proto.grpc.GetVersionReply;
import bisq.proto.grpc.GetVersionRequest;
import bisq.proto.grpc.PlaceOfferGrpc;
import bisq.proto.grpc.PlaceOfferReply;
import bisq.proto.grpc.PlaceOfferRequest;
import bisq.proto.grpc.StopServerGrpc;
import bisq.proto.grpc.StopServerReply;
import bisq.proto.grpc.StopServerRequest;

import io.grpc.Server;
import io.grpc.ServerBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
syntax = "proto3";
package io.bisq.protobuffer;

// FIXME: IntelliJ does not recognize the import but the compiler does
import "pb.proto";

option java_package = "bisq.grpc";
option java_package = "bisq.proto.grpc";
option java_multiple_files = true;

///////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -68,7 +67,6 @@ service GetTradeStatistics {
message GetTradeStatisticsRequest {
}

// FIXME: IntelliJ does not recognize the imported TradeStatistics2 but the compiler does
message GetTradeStatisticsReply {
repeated TradeStatistics2 TradeStatistics = 1;
}
Expand All @@ -85,7 +83,6 @@ service GetOffers {
message GetOffersRequest {
}

// FIXME: IntelliJ does not recognize the imported Offer but the compiler does
message GetOffersReply {
repeated Offer offers = 1;
}
Expand All @@ -102,7 +99,6 @@ service GetPaymentAccounts {
message GetPaymentAccountsRequest {
}

// FIXME: IntelliJ does not recognize the imported PaymentAccount but the compiler does
message GetPaymentAccountsReply {
repeated PaymentAccount paymentAccounts = 1;
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include 'protodefinition'
include 'proto'
include 'assets'
include 'common'
include 'p2p'
Expand Down

0 comments on commit ccde089

Please sign in to comment.