From 58972ea08a1120a5c1c508bdce354e838d88772c Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Tue, 23 Jan 2024 14:13:43 +0530 Subject: [PATCH] Bump Guice & Fix Runtime Issues on Java21 (#56) Fix runtime issues on java21 --- build.gradle | 4 +++- examples/build.gradle | 17 ++++++++++++----- guice/build.gradle | 2 ++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 5d1abe63..c987df34 100644 --- a/build.gradle +++ b/build.gradle @@ -49,7 +49,7 @@ publishing { def grpcVersion = '1.38.0' def jacksonVersion = '2.9.7' -def guiceVersion = '4.1.0' +def guiceVersion = '5.1.0' subprojects { group = 'com.flipkart.grpc-jexpress' @@ -66,6 +66,8 @@ subprojects { log4j_slf4j : "org.apache.logging.log4j:log4j-slf4j-impl:2.5", commons_configuration : "commons-configuration:commons-configuration:1.10", guice : "com.google.inject:guice:${guiceVersion}", + guava : 'com.google.guava:guava:30.1-jre', + jaxb_api : 'javax.xml.bind:jaxb-api:2.3.1', dw_metrics : "com.palominolabs.metrics:metrics-guice:5.0.1", dw_metrics_healthchecks : "io.dropwizard.metrics5:metrics-healthchecks:5.0.0", dw_metrics_annotation : "io.dropwizard.metrics5:metrics-annotation:5.0.0", diff --git a/examples/build.gradle b/examples/build.gradle index cb72588d..12b3dd92 100644 --- a/examples/build.gradle +++ b/examples/build.gradle @@ -24,9 +24,16 @@ def protobufVersion = '3.12.0' def protocVersion = protobufVersion dependencies { - implementation "com.flipkart.grpc-jexpress:core:${jexpressVersion}" - implementation "com.flipkart.grpc-jexpress:runtime:${jexpressVersion}" - implementation "com.flipkart.grpc-jexpress:guice:${jexpressVersion}" + //For Development + implementation project(':core') + implementation project(':runtime') + implementation project(':guice') + + // In actual + // implementation "com.flipkart.grpc-jexpress:core:${jexpressVersion}" + // implementation "com.flipkart.grpc-jexpress:runtime:${jexpressVersion}" + // implementation "com.flipkart.grpc-jexpress:guice:${jexpressVersion}" + implementation "io.grpc:grpc-netty-shaded:${grpcVersion}" implementation "io.grpc:grpc-protobuf:${grpcVersion}" implementation "io.grpc:grpc-stub:${grpcVersion}" @@ -69,7 +76,7 @@ sourceSets { startScripts.enabled = false task helloWorldServer(type: CreateStartScripts) { - mainClassName = 'com.flipkart.gjex.examples.helloworld.HelloWorldApplication' + mainClass = 'com.flipkart.gjex.examples.helloworld.HelloWorldApplication' applicationName = 'hello-world-server' outputDir = new File(project.buildDir, 'tmp') classpath = startScripts.classpath @@ -86,7 +93,7 @@ task runHelloWorldServer(type: JavaExec) { task helloWorldClient(type: CreateStartScripts) { - mainClassName = 'com.flipkart.gjex.examples.helloworld.client.HelloWorldClient' + mainClass = 'com.flipkart.gjex.examples.helloworld.client.HelloWorldClient' applicationName = 'hello-world-client' outputDir = new File(project.buildDir, 'tmp') classpath = startScripts.classpath diff --git a/guice/build.gradle b/guice/build.gradle index 9e451c5a..15ec68e3 100644 --- a/guice/build.gradle +++ b/guice/build.gradle @@ -30,6 +30,8 @@ dependencies { implementation project(':core') implementation libraries.commons_configuration implementation libraries.guice + implementation libraries.guava + implementation libraries.jaxb_api implementation libraries.dw_metrics implementation libraries.dw_metrics_healthchecks implementation libraries.dw_metrics_annotation