@@ -45,14 +45,18 @@ plugin( 'org.codehaus.mojo:build-helper-maven-plugin', '1.9' ) do
4545 execute_goal 'add-source' , :phase => 'process-classes' , :sources => [ gen_sources ]
4646end
4747
48- plugin ( :compiler , '3.9.0' ,
49- :source => '1.8' , :target => java_target , :release => '8' ,
50- :encoding => 'UTF-8' , :debug => true ,
51- :showWarnings => true , :showDeprecation => true ,
52- :excludes => [ 'module-info.java' ] ,
53- #:jdkToolchain => { :version => '[1.7,11)' },
54- :generatedSourcesDirectory => gen_sources ,
55- :annotationProcessors => [ 'org.jruby.anno.AnnotationBinder' ] ) do
48+ compiler_configuration = {
49+ :source => '1.8' , :target => java_target , :release => '8' ,
50+ :encoding => 'UTF-8' , :debug => true ,
51+ :showWarnings => true , :showDeprecation => true ,
52+ :excludes => [ 'module-info.java' ] ,
53+ #:jdkToolchain => { :version => '[1.7,11)' },
54+ :generatedSourcesDirectory => gen_sources ,
55+ :annotationProcessors => [ 'org.jruby.anno.AnnotationBinder' ]
56+ }
57+ compiler_configuration . delete ( :release ) if ENV_JAVA [ 'java.specification.version' ] == '1.8'
58+
59+ plugin ( :compiler , '3.9.0' , compiler_configuration ) do
5660
5761 #execute_goal :compile, :id => 'annotation-binder', :phase => 'compile',
5862 # :generatedSourcesDirectory => gen_sources, #:outputDirectory => gen_sources,
0 commit comments