Skip to content

Commit

Permalink
Added packages & classes used by WebFX CLI for usage export (hardcoded)
Browse files Browse the repository at this point in the history
  • Loading branch information
salmonb committed Mar 19, 2024
1 parent d61562d commit 054833d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/dev/webfx/mavenplugin/ExportMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ private static Document exportDocument(DevWebFxModuleFile webFxModuleFile) {
ReusableStream<ProjectModule> usageCoverage = projectModule.getDirectivesUsageCoverage();
// First pass: searching all the if-uses-java-package and if-java-classes directives and collecting the packages or classes that require to find the usage
LOGGER.accept("Collecting usages in directives");
Set<String> packagesListedInDirectives = new HashSet<>(); // To be populated
Set<String> classesListedInDirectives = new HashSet<>(); // To be populated
// We initialise the packages and classes with those always used by the WebFX CLI (hardcoded in the code)
Set<String> packagesListedInDirectives = new HashSet<>(List.of("java.time", "java.text", "java.lang.ref", "java.util.regex", "netscape.javascript"));
Set<String> classesListedInDirectives = new HashSet<>(List.of("java.io.EOFException", "java.util.ServiceLoader", "java.util.Properties"));
usageCoverage
.forEach(pm -> collectJavaPackagesAndClassesListedInDirectives(pm, packagesListedInDirectives, classesListedInDirectives));
LOGGER.accept("- packages listed in directives: " + packagesListedInDirectives);
Expand Down

0 comments on commit 054833d

Please sign in to comment.