Skip to content

Instantly share code, notes, and snippets.

@nanaze
Created March 29, 2015 02:41
Show Gist options
  • Save nanaze/b3f8314f7bea2ae5e152 to your computer and use it in GitHub Desktop.
Save nanaze/b3f8314f7bea2ae5e152 to your computer and use it in GitHub Desktop.
bazel genrule definition to compile scala to a .jar
def scala_jar(name, srcs, visibility=None):
native.genrule(
name = name,
srcs = srcs,
outs = ['%s.jar' % name],
cmd = 'touch $@ && scalac -d $@ $(SRCS)',
visibility = visibility
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment