Skip to content

Commit

Permalink
Add handling for JRE dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawi01 committed Dec 15, 2023
1 parent 6befa63 commit 59c91fd
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/support/lombok/eclipse/dependencies/UpdateSite.java
Original file line number Diff line number Diff line change
@@ -90,16 +90,26 @@ private Set<String> resolve(List<String> dependencies, boolean withDependencies)
System.out.println("Skipping unknown unit " + next);
continue;
}
// Remove a.jre.javase dependency
List<Unit> filteredProvidedUnits = providedUnits.stream()
.filter(u -> !u.id.equals("a.jre.javase")) // Remove
.collect(Collectors.toList());

if (filteredProvidedUnits.size() == 0) {
// This is a JDK only dependency, skip
continue;
}

// Skip ambiguous (we could use version ranges to solve that...)
if (providedUnits.size() > 1) {
boolean alreadyResolved = providedUnits.stream().anyMatch(resolved::contains);
if (filteredProvidedUnits.size() > 1) {
boolean alreadyResolved = filteredProvidedUnits.stream().anyMatch(resolved::contains);
if (!alreadyResolved) {
System.out.println("Ambiguous resolution for " + next + ": " + providedUnits.toString());
System.out.println("Ambiguous resolution for " + next + ": " + filteredProvidedUnits.toString());
continue;
}
}

Unit unit = providedUnits.get(0);
Unit unit = filteredProvidedUnits.get(0);
resolved.add(unit);

if (withDependencies && unit.requires != null) {

0 comments on commit 59c91fd

Please sign in to comment.