lib/ruboto/util/update.rb in ruboto-1.3.1 vs lib/ruboto/util/update.rb in ruboto-1.4.0
- old
+ new
@@ -166,10 +166,14 @@
unless force || (installed_jruby_core && installed_jruby_stdlib)
puts "Cannot find existing jruby jars in libs. Make sure you're in the root directory of your app." if explicit
return false
end
+ # FIXME(uwe): Remove when JRuby 9000 works with Ruboto
+ version ||= ENV['JRUBY_JARS_VERSION'] || '~>1.7.13'
+ # EMXIF
+
install_jruby_jars_gem(version)
begin
gem('jruby-jars', version) if version
require 'jruby-jars'
rescue LoadError
@@ -211,11 +215,11 @@
true
end
def install_jruby_jars_gem(jruby_jars_version = ENV['JRUBY_JARS_VERSION'])
if jruby_jars_version
- version_requirement = " -v #{jruby_jars_version}"
+ version_requirement = " -v '#{jruby_jars_version}'"
end
`gem query -i -n jruby-jars#{version_requirement}`
unless $? == 0
local_gem_dir = ENV['LOCAL_GEM_DIR'] || Dir.getwd
local_gem_file = "#{local_gem_dir}/jruby-jars-#{jruby_jars_version}.gem"
@@ -465,11 +469,11 @@
FileUtils.move "../#{jruby_core}", '.'
`jar -xf #{jruby_core}`
raise "Unpacking jruby-core jar failed: #$?" unless $? == 0
File.delete jruby_core
gem_version = Gem::Version.new(jruby_core_version.to_s.tr('-', '.'))
- if gem_version >= Gem::Version.new('9.0.0.0.SNAPSHOT')
+ if gem_version >= Gem::Version.new('9.0.5.0.SNAPSHOT')
#noinspection RubyLiteralArrayInspection
excluded_core_packages = [
# FIXME(uwe): Exclude these packages?
# '**/*Darwin*',
@@ -486,10 +490,11 @@
'com/kenai/jffi',
'com/kenai/jnr/x86asm',
'com/martiansoftware',
'com/oracle/nfi',
'com/oracle/truffle',
+ 'java',
'jni',
'jnr/constants/platform/darwin',
'jnr/constants/platform/fake',
'jnr/constants/platform/freebsd',
'jnr/constants/platform/openbsd',
@@ -532,26 +537,68 @@
'org/jruby/truffle/runtime/subsystems',
'org/jruby/truffle/runtime/util',
'org/jruby/truffle/runtime/*.class',
'org/jruby/truffle/translator',
]
- elsif gem_version >= Gem::Version.new('1.7.20.dev')
- # TODO(uwe): Remove when we stop supporting jruby-jars 1.7.20
+ elsif gem_version >= Gem::Version.new('9.0.0.0.SNAPSHOT')
+ raise "Unsupported jruby-jars version: #{gem_version}"
+ elsif gem_version >= Gem::Version.new('1.7.23.dev')
+ # TODO(uwe): Remove when we stop supporting jruby-jars 1.7.23
excluded_core_packages = [
- '**/*.sh',
'**/*Aix*',
'**/*Darwin*',
- '**/*darwin*',
+ '**/*FreeBSD*',
+ '**/*MacOS*',
+ '**/*OpenBSD*',
+ '**/*Solaris*',
+ '**/*sunos*',
+ '**/*Windows*',
+ 'META-INF',
+ 'com/headius/invokebinder',
+ 'com/headius/options/example',
+ 'com/kenai/constantine',
+ 'com/kenai/jffi',
+ 'com/kenai/jnr/x86asm',
+ 'com/martiansoftware',
+ 'java',
+ 'jni',
+ 'jnr/constants/platform/fake',
+ 'jnr/enxio',
+ 'jnr/ffi/annotations',
+ 'jnr/ffi/byref',
+ 'jnr/ffi/mapper',
+ 'jnr/ffi/provider',
+ 'jnr/ffi/util',
+ 'jnr/ffi/Struct$*',
+ 'jnr/ffi/types',
+ 'jnr/x86asm',
+ 'org/jruby/ant',
+ 'org/jruby/cext',
+ 'org/jruby/compiler/impl/BaseBodyCompiler*',
+ 'org/jruby/compiler/util',
+ 'org/jruby/demo',
+ 'org/jruby/embed/bsf',
+ 'org/jruby/embed/jsr223',
+ 'org/jruby/embed/osgi',
+ 'org/jruby/ext/ffi/AbstractMemory*',
+ 'org/jruby/ext/ffi/Enums*',
+ 'org/jruby/ext/ffi/io',
+ 'org/jruby/ext/ffi/jffi',
+ 'org/jruby/javasupport/bsf',
+ 'org/yecht',
+ ]
+ elsif gem_version >= Gem::Version.new('1.7.22')
+ # TODO(uwe): Remove when we stop supporting jruby-jars 1.7.22
+ excluded_core_packages = [
+ '**/*Aix*',
+ '**/*Darwin*',
'**/*FreeBSD*',
- '**/*freebsd*',
'**/*MacOS*',
'**/*OpenBSD*',
- '**/*openbsd*',
'**/*Solaris*',
'**/*sunos*',
'**/*Windows*',
- '**/*windows*',
'META-INF',
'com/headius/invokebinder',
'com/headius/options/example',
'com/kenai/constantine',
'com/kenai/jffi',
@@ -580,10 +627,9 @@
'org/jruby/ext/ffi/Enums*',
'org/jruby/ext/ffi/io',
'org/jruby/ext/ffi/jffi',
'org/jruby/javasupport/bsf',
'org/yecht',
- 'yaml.rb',
]
elsif gem_version >= Gem::Version.new('1.7.19')
# TODO(uwe): Remove when we stop supporting jruby-jars 1.7.19
excluded_core_packages = %w(**/*.sh **/*Darwin* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius/invokebinder com/headius/options/example com/kenai/constantine com/kenai/jffi com/kenai/jnr/x86asm com/martiansoftware jni jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/enxio jnr/ffi/annotations jnr/ffi/byref jnr/ffi/mapper jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/Aix* jnr/posix/FreeBSD* jnr/posix/MacOS* jnr/posix/OpenBSD* jnr/x86asm org/jruby/ant org/jruby/cext org/jruby/compiler/impl/BaseBodyCompiler* org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/AbstractMemory* org/jruby/ext/ffi/Enums* org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/javasupport/bsf org/yecht yaml.rb)
elsif gem_version >= Gem::Version.new('1.7.18')