blob: 81b5cb0b476c6c7f9ac422d4838e8b8a1c0ebc0c [file] [log] [blame]
# This is a canonical example of a genrule() that generates Java source code
# paired with a java_library() that compiles the output of the genrule() along
# with some hard-coded Java source code into a single library.
genrule(
name = 'generate_java_sources',
srcs = [
'create_java.sh',
],
cmd = '$SRCDIR/create_java.sh $OUT',
out = 'output.src.zip',
)
java_library(
name = 'lib',
srcs = glob(['*.java']) + [genfile('output.src.zip')],
deps = [
'//:generate_java_sources',
],
)