From 957cf7d09aae59db7026e607ca42768aad644ebc Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Mon, 25 Nov 2024 13:55:21 -0600 Subject: [PATCH] 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 https://github.com/rake-compiler/rake-compiler/pull/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+. --- Rakefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Rakefile b/Rakefile index c52b5640e..3d157d475 100644 --- a/Rakefile +++ b/Rakefile @@ -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'