@Then("^The following dependencies are excluded from \"([^\"]*) ([^\"]*)\":$")
public void theFollowingDependenciesAreExcludedFrom(String configuration, String from, List<String> exclusions) throws Throwable {
JsonObject reportForProject = report.getAsJsonObject(projectName);
assertThat(reportForProject).describedAs("Report for " + projectName).isNotNull();
for (JsonElement dependency : reportForProject.getAsJsonArray(configuration)) {
JsonObject dependencyObject = dependency.getAsJsonObject();
if (from.equals(dependencyObject.get("coordinates").getAsString())) {
assertThat(dependencyObject.getAsJsonArray("excludes"))
.extracting(JsonObject.class::cast)
.extracting(it -> {
String group = it.get("group").getAsString();
JsonElement module = it.get("module");
if (module.isJsonNull()) {
return group;
}
return group + ":" + module.getAsString();
})
.containsAll(exclusions);
break;
}
}
}
GradleStepdefs.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:gradle-maven-sync-plugin
作者:
评论列表
文章目录