From 598b216559365f650165405e533bc56b0b8053a4 Mon Sep 17 00:00:00 2001 From: Sergio del Amo Date: Thu, 9 Jan 2025 10:39:10 +0100 Subject: [PATCH] use protobuf-java from grpc --- gradle/libs.versions.toml | 5 +++-- settings.gradle | 1 + views-soy/build.gradle.kts | 5 +++-- .../java/io/micronaut/views/soy/SoySauceViewsRenderer.java | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9bb472881..f7d894b8b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,7 +14,7 @@ managed-handlebars = "4.3.1" managed-jstachio = "1.3.6" managed-jte = "3.1.15" managed-rocker = "1.4.0" -managed-soy = "2024-12-13" +managed-soy = "2023-09-13" org-json = "20240303" managed-thymeleaf = "3.1.3.RELEASE" managed-velocity = "2.4.1" @@ -26,9 +26,10 @@ kotlin = "1.9.25" kotlinx-coroutines = "1.9.0" sonatype-scan = "3.0.0" micronaut-logging = "1.5.1" - +micronaut-grpc = "4.8.0" [libraries] # Core +micronaut-grpc = { module = "io.micronaut.grpc:micronaut-grpc-bom", version.ref = "micronaut-grpc" } micronaut-core = { module = 'io.micronaut:micronaut-core-bom', version.ref = 'micronaut' } micronaut-sql = { module = "io.micronaut.sql:micronaut-sql-bom", version.ref = "micronaut-sql" } micronaut-logging = { module = "io.micronaut.logging:micronaut-logging-bom", version.ref = "micronaut-logging" } diff --git a/settings.gradle b/settings.gradle index 43af32c61..062b00fee 100644 --- a/settings.gradle +++ b/settings.gradle @@ -54,6 +54,7 @@ micronautBuild { importMicronautCatalog() importMicronautCatalog("micronaut-data") importMicronautCatalog("micronaut-sql") + importMicronautCatalog("micronaut-grpc") importMicronautCatalog("micronaut-security") importMicronautCatalog("micronaut-serde") importMicronautCatalog("micronaut-validation") diff --git a/views-soy/build.gradle.kts b/views-soy/build.gradle.kts index 0e7f72069..6d057a789 100644 --- a/views-soy/build.gradle.kts +++ b/views-soy/build.gradle.kts @@ -9,8 +9,8 @@ dependencies { api(libs.managed.soy) { exclude(group = "org.json", module = "json") } + implementation(mnGrpc.protobuf.java) // apply com.google.protobuf:protobuf-java directly because the version brought transitively contains a vulnerable version. implementation(libs.org.json) - compileOnly(mn.micronaut.management) compileOnly(mnValidation.micronaut.validation) compileOnly(mn.micronaut.http) @@ -25,4 +25,5 @@ dependencies { testImplementation(mn.micronaut.management) testImplementation(mnValidation.micronaut.validation) testImplementation(mn.snakeyaml) -} \ No newline at end of file +} + diff --git a/views-soy/src/main/java/io/micronaut/views/soy/SoySauceViewsRenderer.java b/views-soy/src/main/java/io/micronaut/views/soy/SoySauceViewsRenderer.java index 3e5dc20b7..8b05d68db 100644 --- a/views-soy/src/main/java/io/micronaut/views/soy/SoySauceViewsRenderer.java +++ b/views-soy/src/main/java/io/micronaut/views/soy/SoySauceViewsRenderer.java @@ -128,6 +128,7 @@ public String getTemplateName() { public Map getParamsAsMap() { return null; } + }); renderer.setData(context); if (injectNonce) {