Skip to content

Commit

Permalink
Move demo programs into a dedicated package
Browse files Browse the repository at this point in the history
  • Loading branch information
sormuras committed May 23, 2024
1 parent 8654903 commit ee7456e
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .bach/src/run.bach/run/Format.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package run;

import run.external.GoogleJavaFormat;
import run.demo.GoogleJavaFormat;

class Format {
public static void main(String... args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the Universal Permissive License v 1.0 -> https://opensource.org/license/upl
*/

package run.external;
package run.demo;

import java.net.URI;
import java.nio.file.Files;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the Universal Permissive License v 1.0 -> https://opensource.org/license/upl
*/

package run.external;
package run.demo;

import java.net.URI;
import java.nio.file.Files;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package run;
package run.demo;

import java.nio.file.Files;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package run.external;
package run.demo;

/**
* JResolve - a command line tool for resolving dependencies on the JVM.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package run;
package run.demo;

import run.bach.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the Universal Permissive License v 1.0 -> https://opensource.org/license/upl
*/

package run.external;
package run.demo;

import java.net.URI;
import java.nio.file.Files;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package run.external;
package run.demo;

import java.lang.module.ModuleFinder;
import java.lang.module.ModuleReference;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package run;
package run.demo;

import bach.info.org.jreleaser.JReleaser;
import bach.info.org.junit.JUnit;
Expand All @@ -8,7 +8,6 @@
import run.bach.ModuleResolver;
import run.bach.ToolFinder;
import run.bach.workflow.Folders;
import run.external.Ant;

public class ModuleResolverDemo {
public static void main(String... args) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package run;
package run.demo;

import java.io.*;
import java.util.*;
import java.util.concurrent.Callable;
import java.util.function.Consumer;
import java.util.spi.*;
import run.bach.*;
import run.external.Ant;
import run.external.GoogleJavaFormat;
import run.external.Maven;

class ToolFinderDemo {
public static void main(String... args) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package run;
package run.demo;

import run.bach.*;
import run.external.Maven;

class ToolSpaceDemo extends ToolSpace {
public static void main(String... args) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package run;
package run.demo;

import run.bach.*;
import run.external.*;

class Versions {
class ToolVersionsDemo {
public static void main(String... args) {
// 1-shot, tool provider
Tool.of("jar").run("--version");
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ jobs:
java @bach jar --version
java @bach jfr --version
java @bach https://raw.githubusercontent.com/openjdk/jdk/jdk-22-ga/test/jdk/java/lang/System/Versions.java
java .bach/src/run.bach/run/Versions.java
java .bach/src/run.bach/run/demo/ToolVersionsDemo.java
- name: 'Build Bach with Bach'
run: java @build

0 comments on commit ee7456e

Please sign in to comment.