@@ -87,7 +87,8 @@ private LinkageChecker createLinkageChecker(Bom bom)
8787 new DependencyGraphBuilder (
8888 ImmutableList .of (
8989 "https://repo1.maven.org/maven2/" ,
90- "https://google.oss.sonatype.org/content/repositories/snapshots/" ));
90+ "https://google.oss.sonatype.org/content/repositories/snapshots/" ,
91+ "https://maven.google.com/" ));
9192 ClassPathBuilder classPathBuilder = new ClassPathBuilder (graphBuilder );
9293
9394 // full: false to avoid fetching optional dependencies.
@@ -96,8 +97,20 @@ private LinkageChecker createLinkageChecker(Bom bom)
9697 ImmutableList <ClassPathEntry > classpath = classPathResult .getClassPath ();
9798 ImmutableList <UnresolvableArtifactProblem > artifactProblems =
9899 classPathResult .getArtifactProblems ();
99- if (!artifactProblems .isEmpty ()) {
100- throw new IOException ("Could not resolve artifacts: " + artifactProblems );
100+ List <UnresolvableArtifactProblem > realProblems =
101+ artifactProblems .stream ()
102+ .filter (
103+ problem -> {
104+ Artifact artifact = problem .getArtifact ();
105+ if ("com.google.android.google-play-services" .equals (artifact .getGroupId ())
106+ && "google-play-services" .equals (artifact .getArtifactId ())) {
107+ return false ; // Ignore legacy provided dependency which is not public
108+ }
109+ return true ;
110+ })
111+ .collect (Collectors .toList ());
112+ if (!realProblems .isEmpty ()) {
113+ throw new IOException ("Could not resolve artifacts: " + realProblems );
101114 }
102115 List <ClassPathEntry > artifactsInBom = classpath .subList (0 , managedDependencies .size ());
103116 ImmutableSet <ClassPathEntry > entryPoints = ImmutableSet .copyOf (artifactsInBom );
0 commit comments