Skip to content

Instantly share code, notes, and snippets.

@sombriks
Created March 6, 2026 16:17
Show Gist options
  • Select an option

  • Save sombriks/40e41c7718f125bfe0ab4e33c2b6fa14 to your computer and use it in GitHub Desktop.

Select an option

Save sombriks/40e41c7718f125bfe0ab4e33c2b6fa14 to your computer and use it in GitHub Desktop.
bld dagger2 example
package xpto;
import rife.bld.Project;
import rife.bld.operations.JavacOptions;
import java.io.File;
import java.nio.file.Paths;
import java.util.List;
import static rife.bld.dependencies.Repository.*;
import static rife.bld.dependencies.Scope.*;
public class XptoBuild extends Project {
public XptoBuild() {
pkg = "xpto";
name = "xpto";
mainClass = "xpto.Xpto";
version = version(0,1,0);
downloadSources = true;
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
scope(compile)
.include(dependency("com.google.dagger","dagger",version(2,59,2)));
scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5,11,4)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1,11,4)));
// dagger compiler
scope(provided)
.include(dependency("com.google.dagger","dagger-compiler",version(2,59,2)));
compileOperation()
.compileOptions()
.process(JavacOptions.Processing.FULL)
.sourceOutput(Paths.get("src", "generated", "java"));
}
public static void main(String[] args) {
new XptoBuild().start(args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment