Skip to content

Commit

Permalink
Install tools eagerly
Browse files Browse the repository at this point in the history
  • Loading branch information
sormuras committed Apr 13, 2024
1 parent 597d597 commit 06cf979
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .bach/src/run.bach/run/Versions.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,21 @@ public static void main(String... args) {
Tool.of("java").run("--version");

// 1-shot, tool installer
Tool.of(new Ant()).run("-version");
Tool.of(new GoogleJavaFormat()).run("--version");
Tool.of(new Maven()).run("--version");
Tool.of("https://github.com/rife2/bld/releases/download/1.9.0/bld-1.9.0.jar").run("version");
Tool.of(new Ant(), ToolInstaller.Mode.INSTALL_IMMEDIATE).run("-version");

// multi-shot, tool finder
var finder =
ToolFinder.ofInstaller()
ToolFinder.ofInstaller(ToolInstaller.Mode.INSTALL_IMMEDIATE)
.with(new Ant())
.withJavaApplication(
"rife2/bld@1.9.0",
"https://github.com/rife2/bld/releases/download/1.9.0/bld-1.9.0.jar")
.withJavaApplication(
"org.junit.platform/junit@1.10.2",
"https://repo.maven.apache.org/maven2/org/junit/platform/junit-platform-console-standalone/1.10.2/junit-platform-console-standalone-1.10.2.jar")
.with("run/google-java-format@1.22", new GoogleJavaFormat("1.22.0"))
.with("run/google-java-format@1.19", new GoogleJavaFormat("1.19.2"))
.with("run.bach/google-java-format@1.22", new GoogleJavaFormat("1.22.0"))
.with("run.bach/google-java-format@1.19", new GoogleJavaFormat("1.19.2"))
.with(new Maven());

var runner = ToolRunner.of(finder);
Expand Down
2 changes: 1 addition & 1 deletion .bach/src/run.bach/run/bach
Submodule bach updated 1 files
+19 −0 ToolInstaller.java

0 comments on commit 06cf979

Please sign in to comment.