lib/buildr/javacc.rb in buildr-1.0.0 vs lib/buildr/javacc.rb in buildr-1.1.0
- old
+ new
@@ -3,13 +3,11 @@
module Buildr
module JavaCC
REQUIRES = [ "net.java.dev.javacc:javacc:jar:4.0", "net.java.dev.javacc:javacc:jar:4.0" ]
- Java.rjb.onload do
- Java.rjb.classpath << REQUIRES
- end
+ Java.rjb.classpath << REQUIRES
class << self
def javacc(*args)
options = Hash === args.last ? args.pop : {}
@@ -43,11 +41,11 @@
options = args.pop
in_package = options[:in_package].split(".")
else
in_package = []
end
- file(path_to("target/generated/javacc")=>args.flatten) do |task|
+ file(path_to(:target, "generated/javacc")=>args.flatten) do |task|
JavaCC.javacc task.prerequisites, :output=>File.join(task.name, in_package)
end
end
def jjtree(*args)
@@ -56,10 +54,10 @@
in_package = options[:in_package].split(".")
build_node_files = options[:build_node_files]
else
in_package = []
end
- file(path_to("target/generated/jjtree")=>args.flatten) do |task|
+ file(path_to(:target, "generated/jjtree")=>args.flatten) do |task|
JavaCC.jjtree task.prerequisites, :output=>File.join(task.name, in_package), :build_node_files=>build_node_files
end
end
end