Protobuf's Linakge Monitor check to use a local test BOM rather than google-cloud-shared-dependencies

PiperOrigin-RevId: 547882989
pull/13312/head
Protobuf Team Bot 2023-07-13 12:26:38 -07:00 committed by Mike Kruskal
parent 725a592c54
commit ac3cad9445
3 changed files with 88 additions and 7 deletions

View File

@ -26,6 +26,7 @@ sh_test(
] + glob([
"pom.xml",
"*/pom.xml",
"test/linkage-monitor-check-bom/pom.xml",
]),
)

View File

@ -1,6 +1,6 @@
#!/bin/bash
set -e
set -e -o pipefail
echo "Running Linkage Monitor check"
@ -17,22 +17,27 @@ fi
cd java
# Install the test BOM for Linkage Monitor
pushd test/linkage-monitor-check-bom
mvn -e -B install
popd
# Linkage Monitor requires the artifacts to be available in local Maven
# repository.
mvn --projects "bom,core,util" -e -B -Dhttps.protocols=TLSv1.2 clean generate-sources install \
mvn -e -B clean generate-sources install \
-Dhttps.protocols=TLSv1.2 \
-Dmaven.test.skip=true \
-Dprotobuf.basedir="../.." \
-Dprotoc="${protoc_location}"
echo "Installed the artifacts to local Maven repository"
curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/linkage-monitor-latest-all-deps.jar"
curl -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/linkage-monitor-latest-all-deps.jar"
echo "Running linkage-monitor-latest-all-deps.jar."
# The generated libraries in google-cloud-shared-dependencies would detect
# incompatible changes via Linkage Monitor
# https://github.com/googleapis/sdk-platform-java/tree/main/java-shared-dependencies
java -Xmx2048m -jar linkage-monitor-latest-all-deps.jar com.google.cloud:google-cloud-shared-dependencies
# The libraries in the BOM would detect incompatible changes via Linkage Monitor
java -Xmx2048m -jar linkage-monitor-latest-all-deps.jar \
com.google.protobuf.test:linkage-monitor-check-bom
echo "Finished running Linkage Monitor check"

View File

@ -0,0 +1,75 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.protobuf.test</groupId>
<artifactId>linkage-monitor-check-bom</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version><!-- we don't release this BOM -->
<name>Protobuf linkage monitor validation BOM</name>
<description>
A BOM to use in Linkage Monitor. This lists artifacts that use
Protobuf runtime libraries, such as gRPC and Google Cloud
client libraries.
We do not publish this pom.xml to Maven Central.
</description>
<properties>
<!--
This verison is ok to kept old. Linkage Monitor overrides this
version when checking linakage errors
-->
<protobuf.version>3.23.2</protobuf.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-bom</artifactId>
<version>${protobuf.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-bom</artifactId>
<version>1.55.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-common-protos</artifactId>
<version>2.22.0</version>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-common-protos</artifactId>
<version>2.22.0</version>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-iam-v1</artifactId>
<version>1.17.0</version>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-iam-v2</artifactId>
<version>1.17.0</version>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-iam-v2beta</artifactId>
<version>1.17.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>2.29.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable</artifactId>
<version>2.24.1</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>