Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #4845] Apply dependency management to grpcVersion and protobufVersion. #4988

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -650,14 +650,15 @@ subprojects {
sign publishing.publications.mavenJava
}

def grpcVersion = '1.64.0'
def log4jVersion = '2.23.1'
def jacksonVersion = '2.17.1'
def dropwizardMetricsVersion = '4.2.26'
def opentelemetryVersion = '1.36.0'
def mockitoVersion = '4.11.0'
def cloudeventsVersion = '3.0.0'
def grpcVersion = '1.64.0'
def protobufVersion = '3.25.3'
def curatorVersion = '5.7.0'
def mockitoVersion = '4.11.0'

dependencyManagement {
dependencies {
Expand Down Expand Up @@ -727,6 +728,11 @@ subprojects {
dependency "io.grpc:grpc-stub:${grpcVersion}"
dependency "io.grpc:grpc-netty:${grpcVersion}"
dependency "io.grpc:grpc-netty-shaded:${grpcVersion}"
dependency "io.grpc:protoc-gen-grpc-java:${grpcVersion}"

dependency "com.google.protobuf:protobuf-java-util:${protobufVersion}"
dependency "com.google.protobuf:protobuf-java:${protobufVersion}"
dependency "com.google.protobuf:protoc:${protobufVersion}"

dependency "javax.annotation:javax.annotation-api:1.3.2"

Expand All @@ -752,7 +758,9 @@ subprojects {

dependency "com.alibaba:druid-spring-boot-starter:1.2.23"
dependency "org.springframework.boot:spring-boot-starter-jetty:2.7.18"

dependency "com.mysql:mysql-connector-j:8.4.0"

}
}
}
6 changes: 2 additions & 4 deletions eventmesh-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/

def grpcVersion = '1.64.0'

dependencies {
api "com.google.guava:guava"
api "org.slf4j:slf4j-api"
Expand Down Expand Up @@ -49,8 +47,8 @@ dependencies {

implementation "io.netty:netty-all"

implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "io.grpc:grpc-protobuf"
implementation "io.grpc:grpc-stub"
implementation "javax.annotation:javax.annotation-api:1.3.2"

testImplementation "org.junit-pioneer:junit-pioneer"
Expand Down
10 changes: 4 additions & 6 deletions eventmesh-examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/

def grpcVersion = '1.64.0'

dependencies {
implementation project(":eventmesh-sdks:eventmesh-sdk-java")
implementation project(":eventmesh-common")
Expand All @@ -31,10 +29,10 @@ dependencies {
implementation "io.openmessaging:openmessaging-api"
implementation 'com.alibaba.nacos:nacos-client'

implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "io.grpc:grpc-netty:${grpcVersion}"
implementation "io.grpc:grpc-netty-shaded:${grpcVersion}"
implementation "io.grpc:grpc-protobuf"
implementation "io.grpc:grpc-stub"
implementation "io.grpc:grpc-netty"
implementation "io.grpc:grpc-netty-shaded"

compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
Expand Down
13 changes: 6 additions & 7 deletions eventmesh-meta/eventmesh-meta-raft/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ plugins {
id 'com.google.protobuf' version '0.9.4'
}

def grpcVersion = '1.64.0'
def protobufVersion = '3.25.3'
def protocVersion = protobufVersion

def jraftVersion = '1.3.14'

dependencies {
implementation ("io.grpc:grpc-protobuf:${grpcVersion}") {
implementation ("io.grpc:grpc-protobuf") {
exclude group: "com.google.protobuf", module: "protobuf-java"
}
implementation("com.google.protobuf:protobuf-java:${protobufVersion}")
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
implementation "com.google.protobuf:protobuf-java"
implementation "io.grpc:grpc-stub"
implementation "com.google.protobuf:protobuf-java-util"
implementation "javax.annotation:javax.annotation-api:1.3.2"
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
Expand All @@ -44,9 +43,9 @@ dependencies {
}

protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
protoc { artifact = "com.google.protobuf:protoc" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
grpc { artifact = "io.grpc:protoc-gen-grpc-java" }
}
generateProtoTasks {
all()*.plugins {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {
implementation "io.cloudevents:cloudevents-core"
implementation "com.google.guava:guava"
implementation "io.cloudevents:cloudevents-json-jackson"
implementation ("io.grpc:grpc-protobuf:1.64.0") {
implementation ("io.grpc:grpc-protobuf") {
exclude group: "com.google.protobuf", module: "protobuf-java"
}
implementation("com.google.protobuf:protobuf-java:3.25.3")
Expand Down
13 changes: 6 additions & 7 deletions eventmesh-protocol-plugin/eventmesh-protocol-grpc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,24 @@ repositories {
mavenCentral()
}

def grpcVersion = '1.64.0'
def protobufVersion = '3.25.3'
def protocVersion = protobufVersion

Comment on lines 27 to 29
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant protobufVersion field.

dependencies {
implementation ("io.grpc:grpc-protobuf:${grpcVersion}") {
implementation ("io.grpc:grpc-protobuf") {
exclude group: "com.google.protobuf", module: "protobuf-java"
}
implementation("com.google.protobuf:protobuf-java:${protobufVersion}")
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
implementation "com.google.protobuf:protobuf-java"
implementation "io.grpc:grpc-stub"
implementation "com.google.protobuf:protobuf-java-util"
implementation "javax.annotation:javax.annotation-api:1.3.2"
testImplementation 'org.junit.jupiter:junit-jupiter'
}

protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
protoc { artifact = "com.google.protobuf:protoc" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
grpc { artifact = "io.grpc:protoc-gen-grpc-java" }
}
generateProtoTasks {
all()*.plugins {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {
implementation "io.cloudevents:cloudevents-core"
implementation "com.google.guava:guava"
implementation "io.cloudevents:cloudevents-json-jackson"
implementation ("io.grpc:grpc-protobuf:1.64.0") {
implementation ("io.grpc:grpc-protobuf") {
exclude group: "com.google.protobuf", module: "protobuf-java"
}
implementation("com.google.protobuf:protobuf-java:3.25.3")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
dependencies {
implementation project(":eventmesh-protocol-plugin:eventmesh-protocol-api")
implementation "io.cloudevents:cloudevents-core"
implementation ("io.grpc:grpc-protobuf:1.64.0") {
implementation ("io.grpc:grpc-protobuf") {
exclude group: "com.google.protobuf", module: "protobuf-java"
}
implementation("com.google.protobuf:protobuf-java:3.25.3")
Expand Down
16 changes: 7 additions & 9 deletions eventmesh-sdks/eventmesh-sdk-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/

def grpcVersion = '1.64.0'

dependencies {
Pil0tXia marked this conversation as resolved.
Show resolved Hide resolved
api(project(":eventmesh-common")) {
// Remove logging backend implementations to allow users to choose their own
Expand All @@ -32,10 +30,10 @@ dependencies {
implementation "io.netty:netty-all"
implementation "org.apache.httpcomponents:httpclient"

implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "io.grpc:grpc-netty:${grpcVersion}"
implementation "io.grpc:grpc-netty-shaded:${grpcVersion}"
implementation "io.grpc:grpc-protobuf"
implementation "io.grpc:grpc-stub"
implementation "io.grpc:grpc-netty"
implementation "io.grpc:grpc-netty-shaded"
implementation "io.cloudevents:cloudevents-protobuf"

// protocol
Expand All @@ -52,9 +50,9 @@ dependencies {
testImplementation "io.netty:netty-all"
testImplementation "org.apache.httpcomponents:httpclient"

implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "com.google.protobuf:protobuf-java-util:3.25.3"
implementation "io.grpc:grpc-protobuf"
implementation "io.grpc:grpc-stub"
implementation "com.google.protobuf:protobuf-java-util"
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

Expand Down
Loading