@Test public void testCompound() throws Exception { ResolvedManifest resolved = new GithubReleasesCoordinateResolver().resolve(environment, new SoftNameDependency("com.github" + ".jomof:firebase/database:2.1.3-rev5")); assert resolved != null; assert resolved.cdepManifestYml.coordinate != null; assertThat(resolved.cdepManifestYml.coordinate.groupId).isEqualTo("com.github.jomof"); assertThat(resolved.cdepManifestYml.coordinate.artifactId).isEqualTo("firebase/database"); assertThat(resolved.cdepManifestYml.coordinate.version.value).isEqualTo("2.1.3-rev5"); assert resolved.cdepManifestYml.android != null; assert resolved.cdepManifestYml.android.archives != null; assertThat(resolved.cdepManifestYml.android.archives.length).isEqualTo(21); }
@Nullable @Override public ResolvedManifest resolve(@NotNull ManifestProvider environment, @NotNull SoftNameDependency dependency) throws IOException, NoSuchAlgorithmException { String coordinate = dependency.compile; assert coordinate != null; Matcher match = pattern.matcher(coordinate); if (match.find()) { String user = match.group(1); String artifactId = match.group(2); String version = match.group(3); String subArtifact = ""; if (artifactId.contains("/")) { int pos = artifactId.indexOf("/"); subArtifact = "-" + artifactId.substring(pos + 1); artifactId = artifactId.substring(0, pos); } String manifest = String.format("https: user, artifactId, version, subArtifact); return urlResolver.resolve(environment, new SoftNameDependency(manifest)); } return null; }
GithubReleasesCoordinateResolver extends CoordinateResolver { @Nullable @Override public ResolvedManifest resolve(@NotNull ManifestProvider environment, @NotNull SoftNameDependency dependency) throws IOException, NoSuchAlgorithmException { String coordinate = dependency.compile; assert coordinate != null; Matcher match = pattern.matcher(coordinate); if (match.find()) { String user = match.group(1); String artifactId = match.group(2); String version = match.group(3); String subArtifact = ""; if (artifactId.contains("/")) { int pos = artifactId.indexOf("/"); subArtifact = "-" + artifactId.substring(pos + 1); artifactId = artifactId.substring(0, pos); } String manifest = String.format("https: user, artifactId, version, subArtifact); return urlResolver.resolve(environment, new SoftNameDependency(manifest)); } return null; } }
GithubReleasesCoordinateResolver extends CoordinateResolver { @Nullable @Override public ResolvedManifest resolve(@NotNull ManifestProvider environment, @NotNull SoftNameDependency dependency) throws IOException, NoSuchAlgorithmException { String coordinate = dependency.compile; assert coordinate != null; Matcher match = pattern.matcher(coordinate); if (match.find()) { String user = match.group(1); String artifactId = match.group(2); String version = match.group(3); String subArtifact = ""; if (artifactId.contains("/")) { int pos = artifactId.indexOf("/"); subArtifact = "-" + artifactId.substring(pos + 1); artifactId = artifactId.substring(0, pos); } String manifest = String.format("https: user, artifactId, version, subArtifact); return urlResolver.resolve(environment, new SoftNameDependency(manifest)); } return null; }  }
GithubReleasesCoordinateResolver extends CoordinateResolver { @Nullable @Override public ResolvedManifest resolve(@NotNull ManifestProvider environment, @NotNull SoftNameDependency dependency) throws IOException, NoSuchAlgorithmException { String coordinate = dependency.compile; assert coordinate != null; Matcher match = pattern.matcher(coordinate); if (match.find()) { String user = match.group(1); String artifactId = match.group(2); String version = match.group(3); String subArtifact = ""; if (artifactId.contains("/")) { int pos = artifactId.indexOf("/"); subArtifact = "-" + artifactId.substring(pos + 1); artifactId = artifactId.substring(0, pos); } String manifest = String.format("https: user, artifactId, version, subArtifact); return urlResolver.resolve(environment, new SoftNameDependency(manifest)); } return null; }  @Nullable @Override ResolvedManifest resolve(@NotNull ManifestProvider environment, @NotNull SoftNameDependency dependency); }
GithubReleasesCoordinateResolver extends CoordinateResolver { @Nullable @Override public ResolvedManifest resolve(@NotNull ManifestProvider environment, @NotNull SoftNameDependency dependency) throws IOException, NoSuchAlgorithmException { String coordinate = dependency.compile; assert coordinate != null; Matcher match = pattern.matcher(coordinate); if (match.find()) { String user = match.group(1); String artifactId = match.group(2); String version = match.group(3); String subArtifact = ""; if (artifactId.contains("/")) { int pos = artifactId.indexOf("/"); subArtifact = "-" + artifactId.substring(pos + 1); artifactId = artifactId.substring(0, pos); } String manifest = String.format("https: user, artifactId, version, subArtifact); return urlResolver.resolve(environment, new SoftNameDependency(manifest)); } return null; }  @Nullable @Override ResolvedManifest resolve(@NotNull ManifestProvider environment, @NotNull SoftNameDependency dependency);  }