<commit_before>package project;

import com.github.sormuras.bach.Main;
import com.github.sormuras.bach.project.Project;
import java.util.Map;

public class Configurator implements Project.Configurator {
  @Override
  public Project apply(Project project) {
    return project
        .withTargetsJava(17)
        .withTargetsJava("test", Runtime.version().feature())
        .withLauncher(Main.class.getCanonicalName())
        .withRequiresModule("com.github.sormuras.hello", "org.junit.platform.console")
        .withExternalModule(
            "com.github.sormuras.hello",
            """
                https://github.com/sormuras/hello/releases\
                /download/1-M3/com.github.sormuras.hello@1-M3.jar\
                #SHA-256=0c993996571cee9555ef947eb198145ddc30a2d834fe606a6f16780afd8aea7b""")
        .withExternalModules(Map.of(/* here be name-from pairs */ ))
        .withExternalModules("junit", "5.8.2")
        .withExternalTool(
            "format@1.15.0",
            """
            https://github.com/google/google-java-format/releases\
            /download/v1.15.0/google-java-format-1.15.0-all-deps.jar\
            #SIZE=3519780\
            &SHA-256=a356bb0236b29c57a3ab678f17a7b027aad603b0960c183a18f1fe322e4f38ea""");
  }
}<commit_msg>Document Bach's own project configurator<commit_after>package project;

import com.github.sormuras.bach.Main;
import com.github.sormuras.bach.project.Project;

public class Configurator implements Project.Configurator {
  @Override
  public Project apply(Project project) {
    // Operate on the project instance preconfigured by Bach
    return project
        // Modules of main module space target Java release 17.
        .withTargetsJava(17)

        // Modules of test module space target current Java release.
        .withTargetsJava("test", Runtime.version().feature())

        // Main module space's main entry-point.
        .withLauncher(Main.class.getCanonicalName())

        // Additional names of external modules required by this project.
        // All other dependencies are acquired from `module-info.java` files.
        .withRequiresModule("com.github.sormuras.hello")
        .withRequiresModule("org.junit.platform.console")

        // Specify remote locations of all required external modules and tools.
        // Locate module "com.github.sormuras.hello" via an explicit URL with checksum fragments.
        .withExternalModule(
            "com.github.sormuras.hello",
            """
             https://github.com/sormuras/hello/releases\
             /download/1-M3/com.github.sormuras.hello@1-M3.jar\
             #SHA-256=0c993996571cee9555ef947eb198145ddc30a2d834fe606a6f16780afd8aea7b
             """)
        // Locate JUnit modules via https://github.com/sormuras/bach-external-modules
        .withExternalModules("junit", "5.8.2")
        // Locate tool "format@1.15.0" via an explicit URL with checksum fragments.
        .withExternalTool(
            "format@1.15.0",
            """
            https://github.com/google/google-java-format/releases\
            /download/v1.15.0/google-java-format-1.15.0-all-deps.jar\
            #SIZE=3519780\
            &SHA-256=a356bb0236b29c57a3ab678f17a7b027aad603b0960c183a18f1fe322e4f38ea
            """);
  }
}
{'fraction_non_alphanumeric': 0.11382361916386939, 'fraction_numerical': 0.07140677448886176, 'mean_word_length': 2.5096359743040684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3822656', 'n_tokens_mistral': 1151, 'n_tokens_neox': 1026, 'n_words': 168}