Create a gist now

Instantly share code, notes, and snippets.

@cushon /BUILD Secret
Last active May 5, 2016

bazel / source generating annotation processors
java_plugin(
name = "auto_plugin",
processor_class = "com.google.auto.value.processor.AutoValueProcessor",
deps = ["@auto_value//jar"],
)
java_library(
name = "auto",
exported_plugins = [":auto_plugin"],
exports = ["@auto_value//jar"],
)
java_library(
name = "test",
srcs = ["Test.java"],
deps = [":auto"],
)
import com.google.auto.value.AutoValue;
@AutoValue
public abstract class Test {
public abstract String message();
public static Test create(String message) {
return new AutoValue_Test(message);
}
}
maven_jar(
name = "auto_value",
artifact = "com.google.auto.value:auto-value:1.2",
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment