Closed sormuras closed 4 years ago
Declined. Don't let build tool specific annotations leak into project sources.
Alternative that is also future-proof:
public class Build {
private static final String VERSION = "2.1-ea";
public static void main(String... args) {
System.out.println("Building Bach.java " + VERSION + "...");
Bach.build(
Configuration.of("Bach.java", VERSION)
.setLog(Log.ofSystem(true))
.setMainRelease(11)
.setModuleDescriber(Build::describeModule)
.setGroup("de.sormuras.bach"));
}
static ModuleDescriptor describeModule(Path info) {
var builder = Configuration.newModule(info);
var module = builder.build();
if (module.name().equals("de.sormuras.bach")) builder.mainClass(Bach.class.getName());
return builder.build();
}
}
Introduce a set of annotations to configure a module?
Introduce a set of annotations to configure a project?