Skip to content

Commit

Permalink
Update JUnit submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
sormuras committed May 24, 2024
1 parent 7cef26a commit 914e8fa
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 26 deletions.
1 change: 0 additions & 1 deletion .bach/src/run.bach/bach/info/org/jreleaser
Submodule jreleaser deleted from c71297
1 change: 0 additions & 1 deletion .bach/src/run.bach/bach/info/org/junit
Submodule junit deleted from 58d65e
2 changes: 1 addition & 1 deletion .bach/src/run.bach/run/Project.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package run;

import bach.info.org.junit.JUnit;
import java.lang.module.ModuleFinder;
import java.nio.file.Files;
import java.util.Optional;
Expand All @@ -17,6 +16,7 @@
import run.bach.workflow.Structure.Space;
import run.bach.workflow.Structure.Spaces;
import run.bach.workflow.Workflow;
import run.info.org.junit.JUnit;

public record Project(boolean verbose, Workflow workflow) implements Builder, Starter {
static Project ofCurrentWorkingDirectory() {
Expand Down
33 changes: 17 additions & 16 deletions .bach/src/run.bach/run/demo/ModuleResolverDemo.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package run.demo;

import bach.info.org.jreleaser.JReleaser;
import bach.info.org.junit.JUnit;
import java.lang.module.ModuleFinder;
import java.nio.file.Path;
import run.bach.ModuleFinders;
import run.bach.ModuleResolver;
import run.bach.ToolFinder;
import run.bach.workflow.Folders;
import run.info.org.junit.JUnit;

public class ModuleResolverDemo {
public static void main(String... args) throws Exception {
Expand All @@ -23,33 +21,36 @@ public static void main(String... args) throws Exception {
resolver.resolveModule("org.junit.platform.console"); // to run tests
resolver.resolveMissingModules();

// "jreleaser" via the tool provider SPI
var jreleaserHome =
Folders.ofCurrentWorkingDirectory().tool(JReleaser.NAME + "@" + JReleaser.VERSION);
var jreleaserResolver = ModuleResolver.ofSingleDirectory(jreleaserHome, JReleaser.MODULES);
jreleaserResolver.resolveModule("org.jreleaser.tool");
jreleaserResolver.resolveMissingModules();
// // "jreleaser" via the tool provider SPI
// var jreleaserHome =
// Folders.ofCurrentWorkingDirectory().tool(JReleaser.NAME + "@" + JReleaser.VERSION);
// var jreleaserResolver = ModuleResolver.ofSingleDirectory(jreleaserHome,
// JReleaser.MODULES);
// jreleaserResolver.resolveModule("org.jreleaser.tool");
// jreleaserResolver.resolveMissingModules();

var tools =
ToolFinder.compose(
ToolFinder.of("jar"), // provides "jar" tool
ToolFinder.of("java"), // provides "java" tool
ToolFinder.of(ModuleFinder.of(lib)), // provides "junit" tool
ToolFinder.of(ModuleFinder.of(jreleaserHome)), // provides "jreleaser" tool
// ToolFinder.of(ModuleFinder.of(jreleaserHome)), // provides "jreleaser"
// tool
ToolFinder.ofInstaller()
.withJavaApplication("demo/release@uri", JReleaser.APPLICATION)
.withJavaApplication(
"demo/release@all", JReleaser.APPLICATION, JReleaser.APPLICATION_ASSETS)
// .withJavaApplication("demo/release@uri", JReleaser.APPLICATION)
// .withJavaApplication(
// "demo/release@all", JReleaser.APPLICATION,
// JReleaser.APPLICATION_ASSETS)
.with(new Ant()) // provides "ant" tool
);

var junit = tools.get("junit");
junit.run("--version");
junit.run("engines");

tools.get("jreleaser").run("--version");
tools.get("releaser1").run("--version");
tools.get("releaser2").run("--version");
// tools.get("jreleaser").run("--version");
// tools.get("releaser1").run("--version");
// tools.get("releaser2").run("--version");

tools.get("ant").run("-version");
}
Expand Down
1 change: 1 addition & 0 deletions .bach/src/run.bach/run/info/org/junit
Submodule junit added at c147fe
7 changes: 2 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "run.bach"]
path = .bach/src/run.bach/run/bach
url = https://github.com/sormuras/run.bach
[submodule "jreleaser"]
path = .bach/src/run.bach/bach/info/org/jreleaser
url = https://github.com/jreleaser/bach.info.org.jreleaser
[submodule "junit"]
path = .bach/src/run.bach/bach/info/org/junit
url = https://github.com/junit-team/bach.info.org.junit
path = .bach/src/run.bach/run/info/org/junit
url = https://github.com/junit-team/bach-info
3 changes: 1 addition & 2 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 914e8fa

Please sign in to comment.