@@ -42,27 +42,30 @@ for repo in ${REPOS_UNDER_TEST//,/ }; do # Split on comma
4242 continue
4343 fi
4444
45- repo_name=$( echo " $repo " | cut -d ' -' -f 2-)
4645 # Perform source-compatibility testing on main (latest changes)
4746 git clone " https://github.com/googleapis/$repo .git" --depth=1
4847 pushd " $repo "
49-
5048 mvn -B -ntp clean install -T 1C -DskipTests -Dclirr.skip
5149
52- # Storage-Nio's artifact ID is google-cloud-nio, not google-cloud-storage-nio
53- if [[ " $repo " == " java-storage-nio" ]]; then
54- repo_name=" nio"
55- fi
56- primary_artifact=$( grep -E " ^google-cloud-${repo_name} " " versions.txt" | head -n 1)
57- version=$( echo " ${primary_artifact} " | tr ' :' ' \n' | tail -n 1)
58- artifact_id=" google-cloud-${repo_name} "
59- echo " Using ${repo} v${version} "
50+ # Match all artifacts that start with google-cloud (rules out proto and grpc modules)
51+ ARTIFACT_LIST=$( cat " versions.txt" | grep " ^google-cloud" | tr ' \n' ' ,' )
52+ ARTIFACT_LIST=${ARTIFACT_LIST% ,}
53+
54+ echo " Found artifacts ${ARTIFACT_LIST} "
6055 popd
6156
62- # The `-s` argument filters the linkage check problems that stem from the artifact
63- program_args=" -r --artifacts com.google.cloud:${artifact_id} :${version} ,com.google.protobuf:protobuf-java:${PROTOBUF_RUNTIME_VERSION} -s com.google.cloud:${artifact_id} :${version} "
64- echo " Linkage Checker Program Arguments: ${program_args} "
65- mvn -B -ntp exec:java -Dexec.mainClass=" com.google.cloud.tools.opensource.classpath.LinkageCheckerMain" -Dexec.args=" ${program_args} "
57+ for artifact in ${ARTIFACT_LIST// ,/ } ; do
58+ artifact_id=$( echo " ${artifact} " | tr ' :' ' \n' | head -n 1)
59+ version=$( echo " ${artifact} " | tr ' :' ' \n' | tail -n 1)
60+
61+ maven_coordinates=" com.google.cloud:${artifact_id} :${version} "
62+ echo " Using ${maven_coordinates} "
63+
64+ # The `-s` argument filters the linkage check problems that stem from the artifact
65+ program_args=" -r --artifacts ${maven_coordinates} ,com.google.protobuf:protobuf-java:${PROTOBUF_RUNTIME_VERSION} -s ${maven_coordinates} "
66+ echo " Linkage Checker Program Arguments: ${program_args} "
67+ mvn -B -ntp exec:java -Dexec.mainClass=" com.google.cloud.tools.opensource.classpath.LinkageCheckerMain" -Dexec.args=" ${program_args} "
68+ done
6669done
6770popd
6871popd
0 commit comments