From a04420c873f7b8ea2c2f1b8a46d4522ce9b079a1 Mon Sep 17 00:00:00 2001 From: Lai Jiang Date: Wed, 3 Aug 2022 10:26:44 -0400 Subject: [PATCH] For some reason after the upgrade to Gradle, the core.jar file is no (#1730) longer included in the generated WAR, even though the deploy_jar configuration is specified as a dependency. I could not figure out a way to tweak the configuration dependency to have core.jar pulled into the .war, so I decided to just explicitly pick it from its known location. TESTED=deployed to alpha and verified that the instances can start. --- appengine_war.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appengine_war.gradle b/appengine_war.gradle index a5cd719c8..f447cbf4a 100644 --- a/appengine_war.gradle +++ b/appengine_war.gradle @@ -26,6 +26,7 @@ project.convention.plugins['war'].webAppDirName = apply plugin: 'com.google.cloud.tools.appengine' def coreResourcesDir = "${rootDir}/core/build/resources/main" +def coreLibsDir = "${rootDir}/core/build/libs" // Get the web.xml file for the service. war { @@ -38,6 +39,10 @@ war { from("${coreResourcesDir}/google/registry/ui/html") { include "*.html" } + from("${coreLibsDir}") { + include "core.jar" + into("WEB-INF/lib") + } } if (project.path == ":services:default") { @@ -98,6 +103,7 @@ rootProject.deploy.dependsOn appengineDeployAll rootProject.stage.dependsOn appengineStage tasks['war'].dependsOn ':core:compileProdJS' tasks['war'].dependsOn ':core:processResources' +tasks['war'].dependsOn ':core:jar' // Impose verification for all of the deployment tasks. We haven't found a // better way to do this other than to apply to each of them independently.