diff --git a/app-gradle-plugin/build.gradle.kts b/app-gradle-plugin/build.gradle.kts
index 0c6a0c4d4..ac5fd12ab 100644
--- a/app-gradle-plugin/build.gradle.kts
+++ b/app-gradle-plugin/build.gradle.kts
@@ -186,9 +186,19 @@ 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 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::")) {
+ // 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"
+ url = uri(stagingDir)
+ }
+ }
}
}
}
diff --git a/pom.xml b/pom.xml
index ed9241625..e327e1a17 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,6 +7,12 @@
0.0.1-SNAPSHOT
pom
+
+
+
+
+
appengine-plugins-core
app-maven-plugin
@@ -109,6 +115,26 @@
exec
+
+ deploy
+
+ deploy
+
+ ./gradlew
+
+ publish
+ -x
+ test
+ -PaltDeploymentRepository=${altDeploymentRepository}
+
+ app-gradle-plugin
+
+
+ exec
+
+