tkobayas commented on code in PR #6860:
URL: https://github.com/apache/incubator-kie/pull/6860#discussion_r3892396882
##########
script/ci/CiComputeBuildScopes.java:
##########
@@ -202,6 +220,102 @@ private static void writeLines(Path out,
Collection<String> lines) throws IOExce
Files.write(out, sorted);
}
+ private static final List<String> EXPECTED_CATEGORIES =
List.of("optaplanner", "kogito-runtimes", "kogito-apps");
+
+ static Map<String, Set<Path>> parseModuleCategories(Path rootPom, Path
cwd) throws IOException {
+ Map<String, Set<Path>> categories = new LinkedHashMap<>();
+ categories.put("drools", new LinkedHashSet<>());
+ for (String cat : EXPECTED_CATEGORIES) {
+ categories.put(cat, new LinkedHashSet<>());
+ }
+
+ String currentCategory = "drools";
+ boolean inModules = false;
+ Set<String> seenBegins = new HashSet<>();
+ Set<String> seenEnds = new HashSet<>();
+
+ Pattern beginPattern =
Pattern.compile("<!--\\s*BEGIN\\s+(\\S+)\\s+modules\\s+\\(auto\\)\\s*-->");
+ Pattern endPattern =
Pattern.compile("<!--\\s*END\\s+(\\S+)\\s+modules\\s+\\(auto\\)\\s*-->");
+ Pattern modulePattern = Pattern.compile("<module>(.+)</module>");
Review Comment:
Thanks. Applied the partition approach.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]