Back to bld

Build file configurator

Change the options and watch a complete, real bld build file regenerate on the server. This is exactly the Build.java you would write by hand, nothing is executed.

package com.example;

import rife.bld.Project;

import java.util.List;

import static rife.bld.dependencies.Repository.*;
import static rife.bld.dependencies.Scope.*;

public class MyAppBuild extends Project {
    public MyAppBuild() {
        pkg = "com.example";
        name = "my-app";
        mainClass = "com.example.MyApp";
        version = version(0,1,0);

        downloadSources = true;
        repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);

        scope(test)
            .include(dependency("org.junit.jupiter",
                                "junit-jupiter",
                                version(6,1,3)))
            .include(dependency("org.junit.platform",
                                "junit-platform-console-standalone",
                                version(6,1,3)));
    }

    public static void main(String[] args) {
        new MyAppBuild().start(args);
    }
}

View the source: BldConfigDemo.java and its template: bldconfig.html

The whole file is rendered by a RIFE2 template, so this page is itself a small bld and RIFE2 example. The RIFE2 web app option is exactly what bld create-rife2 generates.