Details
Description
Scalac compiler does not pass options for javac.
So if encoding option is set :
compile.options.other = %w{-encoding utf-8}
That option is not passed to javac which fails if some java source files contain special characters.
I fixed the issue in our environment like this:
— a/project/vendor/jruby-1.4.0/lib/ruby/gems/1.8/gems/buildr-1.4.1-java/lib/buildr/scala/compiler.rb
+++ b/project/vendor/jruby-1.4.0/lib/ruby/gems/1.8/gems/buildr-1.4.1-java/lib/buildr/scala/compiler.rb
@@ -152,12 +152,13 @@ module Buildr::Scala
def initialize(project, options) #:nodoc:
super
+ # use common options also for javac
+ options[:javac] ||= { :warnings => options[:warnings], :debug => options[:debug], :deprecation => options[:deprecation], :source => options[:source], :target => options[:target], :other => options[:other] }
options[:debug] = Buildr.options.debug if options[:debug].nil?
options[:warnings] = verbose if options[:warnings].nil?
options[:deprecation] ||= false
options[:optimise] ||= false
options[:make] ||= :transitivenocp if Scala.compatible_28?
- options[:javac] ||= {}
@java = Javac.new(project, options[:javac])
end
–
Attachments
Issue Links
- is related to
-
BUILDR-136 Support Scala/Java Joint Compiler
- Closed