/*
 * Bach - Java Shell Builder
 * Copyright (C) 2020 Christian Stein
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/** Bach's own build program. */
class Build {
  public static void main(String... args) {
    System.out.println("Build Bach.java using Bach.java " + Bach.VERSION);
    // new Bach().build(project -> project.version("11.0-ea")).assertSuccessful();
  }
}

@@ -627,16 +627,95 @@
 e.%0A */%0A%0A
+import java.nio.file.Path;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A
 /** Bach
@@ -805,26 +805,45 @@
     
-System.out
+var bach = new Bach();%0A    bach
 .print
-ln
 (%22Bu
@@ -866,34 +866,90 @@
 ing 
-Bach.java %22 + Bach.VERSION
+%25s%22, bach);%0A    var project = newProjectDescriptor();%0A    bach.print(%22%25s%22, project
 );%0A 
@@ -954,26 +954,20 @@
 %0A    // 
-new B
+b
 ach
-()
 .build(p
@@ -976,57 +976,794 @@
 ject
- -%3E project.version(%2211.0-ea%22)).assertSuccessful(
+).assertSuccessful();%0A  %7D%0A%0A  private static Object newProjectDescriptor() %7B%0A    var folders = new ArrayList%3CBach.Folder%3E();%0A    folders.addAll(mainFolders());%0A    folders.addAll(testFolders());%0A    return folders;%0A  %7D%0A%0A  private static List%3CBach.Folder%3E mainFolders() %7B%0A    return List.of(new Bach.Folder(Path.of(%22src/de.sormuras.bach/main/java%22), 11));%0A  %7D%0A%0A  private static List%3CBach.Folder%3E testFolders() %7B%0A    return List.of(%0A        new Bach.Folder(Path.of(%22src/de.sormuras.bach/test/java%22), 14),%0A        new Bach.Folder(Path.of(%22src/de.sormuras.bach/test/java-module%22), 9),%0A        new Bach.Folder(Path.of(%22src/test.base/test/java%22), 14),%0A        new Bach.Folder(Path.of(%22src/test.module/test/java%22), 14),%0A        new Bach.Folder(Path.of(%22src/test.preview/test-preview/java%22), 14)
 );%0A 

Create all folders in build program