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
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ 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 "javax.annotation:javax.annotation-api:1.3.2"

Expand Down
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
9 changes: 4 additions & 5 deletions eventmesh-examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* limitations under the License.
*/

def grpcVersion = '1.64.0'

dependencies {
implementation project(":eventmesh-sdks:eventmesh-sdk-java")
Expand All @@ -31,10 +30,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
7 changes: 3 additions & 4 deletions eventmesh-meta/eventmesh-meta-raft/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,17 @@ 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 "io.grpc:grpc-stub"
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
implementation "javax.annotation:javax.annotation-api:1.3.2"
compileOnly 'org.projectlombok:lombok'
Expand All @@ -46,7 +45,7 @@ dependencies {
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
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 @@ -24,16 +24,15 @@ 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 "io.grpc:grpc-stub"
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
implementation "javax.annotation:javax.annotation-api:1.3.2"
testImplementation 'org.junit.jupiter:junit-jupiter'
Expand All @@ -42,7 +41,7 @@ dependencies {
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
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
13 changes: 6 additions & 7 deletions eventmesh-sdks/eventmesh-sdk-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +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")) {
Expand All @@ -32,10 +31,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,8 +51,8 @@ dependencies {
testImplementation "io.netty:netty-all"
testImplementation "org.apache.httpcomponents:httpclient"

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