diff --git a/build.gradle b/build.gradle index bbda2423f2..3c0306306f 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { @@ -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" @@ -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" + } } } diff --git a/eventmesh-common/build.gradle b/eventmesh-common/build.gradle index 07068fe4c1..d9ed4dbadb 100644 --- a/eventmesh-common/build.gradle +++ b/eventmesh-common/build.gradle @@ -15,8 +15,6 @@ * limitations under the License. */ -def grpcVersion = '1.64.0' - dependencies { api "com.google.guava:guava" api "org.slf4j:slf4j-api" @@ -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" diff --git a/eventmesh-examples/build.gradle b/eventmesh-examples/build.gradle index f732a78439..dfe4164f10 100644 --- a/eventmesh-examples/build.gradle +++ b/eventmesh-examples/build.gradle @@ -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") @@ -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' diff --git a/eventmesh-meta/eventmesh-meta-raft/build.gradle b/eventmesh-meta/eventmesh-meta-raft/build.gradle index e3fb2f6bf9..a050132701 100644 --- a/eventmesh-meta/eventmesh-meta-raft/build.gradle +++ b/eventmesh-meta/eventmesh-meta-raft/build.gradle @@ -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' @@ -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 { diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle b/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle index e7d631f47e..e063b53432 100644 --- a/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle +++ b/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle @@ -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") diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-grpc/build.gradle b/eventmesh-protocol-plugin/eventmesh-protocol-grpc/build.gradle index 191e62cdac..cbc90977af 100644 --- a/eventmesh-protocol-plugin/eventmesh-protocol-grpc/build.gradle +++ b/eventmesh-protocol-plugin/eventmesh-protocol-grpc/build.gradle @@ -24,25 +24,24 @@ repositories { mavenCentral() } -def grpcVersion = '1.64.0' def protobufVersion = '3.25.3' def protocVersion = protobufVersion 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 { diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-http/build.gradle b/eventmesh-protocol-plugin/eventmesh-protocol-http/build.gradle index 1d877a904d..48583dff30 100644 --- a/eventmesh-protocol-plugin/eventmesh-protocol-http/build.gradle +++ b/eventmesh-protocol-plugin/eventmesh-protocol-http/build.gradle @@ -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") diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/build.gradle b/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/build.gradle index 3f6d6ebdb0..7b51ba9989 100644 --- a/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/build.gradle +++ b/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/build.gradle @@ -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") diff --git a/eventmesh-sdks/eventmesh-sdk-java/build.gradle b/eventmesh-sdks/eventmesh-sdk-java/build.gradle index 46e6d8d658..fb176c6cff 100644 --- a/eventmesh-sdks/eventmesh-sdk-java/build.gradle +++ b/eventmesh-sdks/eventmesh-sdk-java/build.gradle @@ -15,8 +15,6 @@ * limitations under the License. */ -def grpcVersion = '1.64.0' - dependencies { api(project(":eventmesh-common")) { // Remove logging backend implementations to allow users to choose their own @@ -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 @@ -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'