Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions app-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
}
}
Expand Down
26 changes: 26 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>

<properties>
<!-- The local filesystem path to deploy the artifacts. This is passed by
the mvn command in the release script. -->
<altDeploymentRepository/>
</properties>

<modules>
<module>appengine-plugins-core</module>
<module>app-maven-plugin</module>
Expand Down Expand Up @@ -109,6 +115,26 @@
<goal>exec</goal>
</goals>
</execution>
<execution>
<id>deploy</id>
<!-- This execution allows the root Maven project to deploy the
Gradle plugin artifact as part of its release build. This removes
the need of creating a custom release script for this repository. -->
<phase>deploy</phase>
<configuration>
<executable>./gradlew</executable>
<arguments>
<argument>publish</argument>
<argument>-x</argument>
<argument>test</argument>
<argument>-PaltDeploymentRepository=${altDeploymentRepository}</argument>
</arguments>
<workingDirectory>app-gradle-plugin</workingDirectory>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
Loading