From ea54c580f5bcc93972c8a4aab09828d87fd117c4 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 20 Oct 2025 15:19:02 +0000 Subject: [PATCH 1/3] ci: app-gradle-plugin to publish artifacts to local folder This will allow the project to deploy the Gradle plugin as part of the root Maven project. This removes the need of creating its own custom release script. --- app-gradle-plugin/build.gradle.kts | 13 ++++++++++--- pom.xml | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/app-gradle-plugin/build.gradle.kts b/app-gradle-plugin/build.gradle.kts index 0c6a0c4d4..56edb4cf8 100644 --- a/app-gradle-plugin/build.gradle.kts +++ b/app-gradle-plugin/build.gradle.kts @@ -186,9 +186,16 @@ publishing { } } repositories { - // For OSS Exit Gate - maven { - url = uri("artifactregistry://us-maven.pkg.dev/oss-exit-gate-prod/appengine-gradle-plugin--com-google-cloud-tools--maven-central") + // For local staging + if (project.hasProperty("altDeploymentRepository")) { + val altDeploymentRepository = project.property("altDeploymentRepository") as String + if (altDeploymentRepository.startsWith("local::default::file:")) { + val stagingDir = altDeploymentRepository.substringAfter("file:") + maven { + name = "local" + url = uri(stagingDir) + } + } } } } diff --git a/pom.xml b/pom.xml index ed9241625..9929da586 100644 --- a/pom.xml +++ b/pom.xml @@ -7,6 +7,10 @@ 0.0.1-SNAPSHOT pom + + + + appengine-plugins-core app-maven-plugin @@ -109,6 +113,23 @@ exec + + deploy + deploy + + ./gradlew + + publish + -x + test + -PaltDeploymentRepository=${altDeploymentRepository} + + app-gradle-plugin + + + exec + + From f2262b628962de6048c511dbf589d3421249c8d8 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 20 Oct 2025 15:23:32 +0000 Subject: [PATCH 2/3] Add comment --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 9929da586..e327e1a17 100644 --- a/pom.xml +++ b/pom.xml @@ -8,6 +8,8 @@ pom + @@ -115,6 +117,9 @@ deploy + deploy ./gradlew From 01054b6be520a0b1d7fd5c905bf11c418264e0ea Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 20 Oct 2025 15:29:28 +0000 Subject: [PATCH 3/3] maven-deploy-plugin compatibility --- app-gradle-plugin/build.gradle.kts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app-gradle-plugin/build.gradle.kts b/app-gradle-plugin/build.gradle.kts index 56edb4cf8..ac5fd12ab 100644 --- a/app-gradle-plugin/build.gradle.kts +++ b/app-gradle-plugin/build.gradle.kts @@ -186,10 +186,13 @@ publishing { } } repositories { - // For local staging + // For local staging of the artifacts. The release script passes this + // property to the Maven commmand, which passes it to the Gradle build. if (project.hasProperty("altDeploymentRepository")) { val altDeploymentRepository = project.property("altDeploymentRepository") as String - if (altDeploymentRepository.startsWith("local::default::file:")) { + if (altDeploymentRepository.startsWith("local::")) { + // Old maven-deploy-plugin had "local::default::file:" and the + // new maven-deploy-plugin has "local::file:" prefix. val stagingDir = altDeploymentRepository.substringAfter("file:") maven { name = "local"