@@ -33,6 +33,7 @@ module Antwrap
33
33
module AntwrapClassLoader
34
34
def load_ant_libs ( ant_home )
35
35
jars = match ( ant_home ) { |p | ext = p [ -4 ...p . size ] ; ext && ext . downcase == '.jar' }
36
+ jars . push 'third_party/java/eclipse_compiler/ecj-3.5.2.jar'
36
37
37
38
if ( RUBY_PLATFORM == 'java' )
38
39
jars . each { |jar | require jar }
@@ -52,6 +53,7 @@ module CrazyFunJava
52
53
@ant = Antwrap ::AntProject . new ( :name => 'selenium' ,
53
54
:ant_home => 'third_party/java/ant' , :basedir => '.' )
54
55
@ant . project . setProperty ( 'XmlLogger.file' , 'build/build_log.xml' )
56
+ @ant . project . setProperty ( 'build.compiler' , 'org.eclipse.jdt.core.JDTCompilerAdapter' ) ;
55
57
56
58
# Silence logging to the console, and output to the xml build file
57
59
@ant . project . getBuildListeners ( ) . get ( 0 ) . setMessageOutputLevel ( verbose ? 2 : 0 )
@@ -212,7 +214,9 @@ def handle(fun, dir, args)
212
214
ant . pathelement ( :location => jar )
213
215
end
214
216
end
215
- CrazyFunJava . ant . javac ( :srcdir => '.' , :destdir => out_dir , :includeAntRuntime => false ) do |ant |
217
+ CrazyFunJava . ant . javac ( :srcdir => '.' , :destdir => out_dir , :includeAntRuntime => false ,
218
+ :optimize => true , :debug => true , :nowarn => true ,
219
+ :source => '1.5' , :target => '1.5' ) do |ant |
216
220
ant . classpath ( :refid => "#{ args [ :name ] } .path" )
217
221
args [ :srcs ] . each do |src_glob |
218
222
ant . include ( :name => [ dir , src_glob ] . join ( File ::SEPARATOR ) )
@@ -404,4 +408,4 @@ def handle(fun, dir, args)
404
408
end
405
409
end
406
410
407
- end # End of java module
411
+ end # End of java module
0 commit comments