Skip to content

Commit

Permalink
Update module resolver demo
Browse files Browse the repository at this point in the history
  • Loading branch information
sormuras committed May 28, 2024
1 parent 442af66 commit 685a3ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .bach/src/run.bach/run/bach
Submodule bach updated 1 files
+10 −0 ModuleLocator.java
3 changes: 3 additions & 0 deletions .bach/src/run.bach/run/demo/ModuleResolverDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

public class ModuleResolverDemo {
public static void main(String... args) throws Exception {
JUnit.modules().names().stream().sorted().forEach(System.out::println);

var libraries = ModuleLocator.compose(JUnit.modules(), JavaFX.version("22.0.1"));

var lib = Path.of("lib");
Expand All @@ -21,6 +23,7 @@ public static void main(String... args) throws Exception {
recording.startAsync();
var resolver = ModuleResolver.ofSingleDirectory(lib, libraries);
resolver.resolveModule("org.junit.jupiter"); // to write and discover tests
resolver.resolveModule("org.junit.platform.suite"); // to discover tests declaratively
resolver.resolveModule("org.junit.platform.console"); // to run tests
resolver.resolveModule("javafx.controls");
resolver.resolveMissingModules();
Expand Down
2 changes: 1 addition & 1 deletion .bach/src/run.bach/run/info/org/junit
Submodule junit updated 2 files
+20 −2 JUnit.java
+10 −7 JUnitLocator.java

0 comments on commit 685a3ef

Please sign in to comment.