Annotation processors are easy to use with bld. Generally, you'll just need to include the processor as a dependency, for example:
public class ExampleBuild extends Project {
    public ExampleBuild() {
        // ...
        scope(provided)
                .include(dependency("com.example", "annotator", version(1, 0, 0)));
    }
}
If the processor is generating source files, you can easily specify where they should be saved, using the sourceOutput compile option, for example:
/**
 * Saves generated source files in the {@code build/generated} directory.
 */
@Override
public void compile() throws Exception {
    var generated = new File(buildDirectory(), "generated");
    var ignore = generated.mkdir();
    compileOperation().compileOptions().process(Processing.FULL).sourceOutput(generated);
    super.compile();
}
To incorporate the generated source code into the source tree, add this directory as an additional source location in your IDE.
[image: 1692592654170-screenshot-from-2023-08-20-21-27-10.png]