Last active
October 5, 2016 23:32
-
-
Save DenWav/ccd3d9de4878690fd74da1eb7c433bb1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set<Module> goodModules = toImport.stream() | |
.flatMap(n -> n.getChildren().stream()) | |
.flatMap(n -> { | |
if (n.getData() instanceof GradleSourceSetData) { | |
return n.getChildren().stream() | |
.filter(n1 -> n1.getData() instanceof DependencyData) | |
.filter(n1 -> ((DependencyData) n1.getData()).getOwnerModule().getExternalName().contains("main")); | |
} else { | |
return Stream.of(n); | |
} | |
}) | |
.filter(n -> n.getData() instanceof AbstractDependencyData) | |
.filter(n -> ((AbstractDependencyData) n.getData()).getExternalName().matches("(^" + spongeMatcher + "|Sponge(Common|API)).*")) | |
.map(n -> modelsProvider.findIdeModule(((DependencyData) n.getData()).getOwnerModule())) | |
.collect(Collectors.toSet()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment