@@ -18,43 +18,7 @@ edge_gemspec = Gem::Specification.load File.join(__dir__, 'concurrent-ruby-edge.
18
18
19
19
require 'rake/javaextensiontask'
20
20
21
- class ConcurrentRubyJavaExtensionTask < Rake ::JavaExtensionTask
22
- def java_classpath_arg ( *args )
23
- jruby_cpath = nil
24
-
25
- if RUBY_PLATFORM =~ /java/
26
- begin
27
- cpath = Java ::java . lang . System . getProperty ( 'java.class.path' ) . split ( File ::PATH_SEPARATOR )
28
- cpath += Java ::java . lang . System . getProperty ( 'sun.boot.class.path' ) . split ( File ::PATH_SEPARATOR )
29
- jruby_cpath = cpath . compact . join ( File ::PATH_SEPARATOR )
30
- rescue => e
31
- end
32
-
33
- unless jruby_cpath
34
- libdir = RbConfig ::CONFIG [ 'libdir' ]
35
- if libdir . start_with? "classpath:"
36
- raise 'Cannot build with jruby-complete'
37
- end
38
- jruby_cpath = File . join ( libdir , "jruby.jar" )
39
- end
40
- end
41
-
42
- unless jruby_cpath
43
- jruby_home = ENV [ 'JRUBY_HOME' ]
44
- if jruby_home
45
- candidate = File . join ( jruby_home , 'lib' , 'jruby.jar' )
46
- jruby_cpath = candidate if File . exist? candidate
47
- end
48
- end
49
-
50
- raise "jruby.jar path not found" unless jruby_cpath
51
-
52
- jruby_cpath += File ::PATH_SEPARATOR + args . join ( File ::PATH_SEPARATOR ) unless args . empty?
53
- jruby_cpath ? "-cp \" #{ jruby_cpath } \" " : ""
54
- end
55
- end
56
-
57
- ConcurrentRubyJavaExtensionTask . new ( 'concurrent_ruby' , core_gemspec ) do |ext |
21
+ Rake ::JavaExtensionTask . new ( 'concurrent_ruby' , core_gemspec ) do |ext |
58
22
ext . ext_dir = 'ext/concurrent-ruby'
59
23
ext . lib_dir = 'lib/concurrent'
60
24
end
@@ -81,7 +45,8 @@ namespace :repackage do
81
45
sh 'bundle package'
82
46
83
47
# build only the jar file not the whole gem for java platform, the jar is part the concurrent-ruby-x.y.z.gem
84
- RakeCompilerDock . sh 'bundle install --local && bundle exec rake lib/concurrent/concurrent_ruby.jar --trace' , rubyvm : :jruby
48
+ Rake ::Task [ 'lib/concurrent/concurrent_ruby.jar' ] . invoke
49
+
85
50
# build all gem files
86
51
RakeCompilerDock . sh 'bundle install --local && bundle exec rake cross native package --trace'
87
52
end
@@ -103,15 +68,14 @@ begin
103
68
104
69
RSpec ::Core ::RakeTask . new ( :spec )
105
70
106
- options = %w[ --color
107
- --backtrace
108
- --seed 1
109
- --format documentation
110
- --tag ~notravis ]
111
-
112
71
namespace :spec do
113
72
desc '* Configured for ci'
114
73
RSpec ::Core ::RakeTask . new ( :ci ) do |t |
74
+ options = %w[ --color
75
+ --backtrace
76
+ --order defined
77
+ --format documentation
78
+ --tag ~notravis ]
115
79
t . rspec_opts = [ *options ] . join ( ' ' )
116
80
end
117
81
0 commit comments