Skip to content

Commit 957cf7d

Browse files
authored
Set rake-compiler source and target to Java 8 (#1071)
This patch forces rake-compiler to emit bytecode for Java 8 level of JVM. rake-compiler currently defaults to Java 1.7 source and target, but that version is no longer supported by recent JDKs such as Java 21 (see rake-compiler/rake-compiler#242 for a patch to update rake-compiler). This patch sets our minimum Java level to 8, bypassing the default in rake-compiler and allowing builds on Java 21+.
1 parent 56227a4 commit 957cf7d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ ENV['JRUBY_HOME'] = ENV['CONCURRENT_JRUBY_HOME'] if ENV['CONCURRENT_JRUBY_HOME']
1212
Rake::JavaExtensionTask.new('concurrent_ruby', core_gemspec) do |ext|
1313
ext.ext_dir = 'ext/concurrent-ruby'
1414
ext.lib_dir = 'lib/concurrent-ruby/concurrent'
15+
ext.source_version = '8'
16+
ext.target_version = '8'
1517
end
1618

1719
if RUBY_ENGINE == 'ruby'

0 commit comments

Comments
 (0)