@@ -56,6 +56,12 @@ LOCAL_GENERATOR_VERSION=$(mvn \
56
56
57
57
git clone https://github.com/googleapis/googleapis.git
58
58
59
+ git clone https://github.com/lqiu96/cloud-opensource-java.git
60
+ pushd cloud-opensource-java
61
+ git checkout source-filter
62
+ mvn -B -ntp clean compile
63
+ pushd dependencies
64
+
59
65
for repo in ${REPOS_UNDER_TEST// ,/ } ; do # Split on comma
60
66
if [[ " $repo " == " google-cloud-java" ]]; then
61
67
continue
@@ -78,5 +84,36 @@ for repo in ${REPOS_UNDER_TEST//,/ }; do # Split on comma
78
84
--generation-config-path=/workspace/generation_config.yaml \
79
85
--repository-path=/workspace \
80
86
--api-definitions-path=/workspace/apis
87
+
88
+ # Compile the Handwritten Library with the Protobuf-Java version to test source compatibility
89
+ mvn clean compile -B -V -ntp \
90
+ -Dclirr.skip=true \
91
+ -Denforcer.skip=true \
92
+ -Dmaven.javadoc.skip=true \
93
+ -Dprotobuf.version=${PROTOBUF_RUNTIME_VERSION} \
94
+ -T 1C
95
+
96
+ mvn -B -ntp install -T 1C -DskipTests -Dclirr.skip
97
+
98
+ # Match all artifacts that start with google-cloud (rules out proto and grpc modules)
99
+ # Exclude any matches to BOM artifacts or emulators
100
+ ARTIFACT_LIST=$( cat " versions.txt" | grep " ^google-cloud" | grep -vE " (bom|emulator)" | tr ' \n' ' ,' )
101
+ ARTIFACT_LIST=${ARTIFACT_LIST% ,}
102
+
103
+ echo " Found artifacts ${ARTIFACT_LIST} "
104
+ popd
105
+
106
+ for artifact in ${ARTIFACT_LIST// ,/ } ; do
107
+ artifact_id=$( echo " ${artifact} " | tr ' :' ' \n' | head -n 1)
108
+ version=$( echo " ${artifact} " | tr ' :' ' \n' | tail -n 1)
109
+
110
+ maven_coordinates=" com.google.cloud:${artifact_id} :${version} "
111
+ echo " Using ${maven_coordinates} "
112
+
113
+ # The `-s` argument filters the linkage check problems that stem from the artifact
114
+ program_args=" -r --artifacts ${maven_coordinates} ,com.google.protobuf:protobuf-java:${PROTOBUF_RUNTIME_VERSION} -s ${maven_coordinates} "
115
+ echo " Linkage Checker Program Arguments: ${program_args} "
116
+ mvn -B -ntp exec:java -Dexec.mainClass=" com.google.cloud.tools.opensource.classpath.LinkageCheckerMain" -Dexec.args=" ${program_args} "
117
+ done
81
118
popd
82
119
done
0 commit comments