Skip to content

Commit

Permalink
Set rake-compiler source and target to Java 8 (#1071)
Browse files Browse the repository at this point in the history
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+.
  • Loading branch information
headius authored Nov 25, 2024
1 parent 56227a4 commit 957cf7d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ENV['JRUBY_HOME'] = ENV['CONCURRENT_JRUBY_HOME'] if ENV['CONCURRENT_JRUBY_HOME']
Rake::JavaExtensionTask.new('concurrent_ruby', core_gemspec) do |ext|
ext.ext_dir = 'ext/concurrent-ruby'
ext.lib_dir = 'lib/concurrent-ruby/concurrent'
ext.source_version = '8'
ext.target_version = '8'
end

if RUBY_ENGINE == 'ruby'
Expand Down

0 comments on commit 957cf7d

Please sign in to comment.