Skip to content

Instantly share code, notes, and snippets.

@cushon

cushon/BUILD Secret

Last active April 23, 2018 15:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cushon/0ffbe4f2a11141106695 to your computer and use it in GitHub Desktop.
Save cushon/0ffbe4f2a11141106695 to your computer and use it in GitHub Desktop.
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