buildr 1.2.8 → 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/Rakefile +1 -1
- data/lib/buildr.rb +1 -1
- data/lib/java/java.rb +28 -23
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
1.2.9 (11/8/2007)
|
2
|
+
* Changed: Upgraded to RJB 1.0.11.
|
3
|
+
* Fixed: Backward compatibility in Java.rjb/wrapper.
|
4
|
+
|
1
5
|
1.2.8 (11/1/2007)
|
2
6
|
* Added: Resolving Maven snapshots from remote repository (Rhett Sutphin)
|
3
7
|
* Changed: scala options.target now takes number, e.g. "1.5" instead of "jvm-1.5" (Nathan Hamblen)
|
data/Rakefile
CHANGED
@@ -44,7 +44,7 @@ def specify(platform)
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
spec = specify(Gem::Platform::RUBY) { |spec| spec.add_dependency "rjb", ">= 1.0.
|
47
|
+
spec = specify(Gem::Platform::RUBY) { |spec| spec.add_dependency "rjb", ">= 1.0.11" }
|
48
48
|
jruby_spec = specify('java')
|
49
49
|
package = Rake::GemPackageTask.new(spec) do |pkg|
|
50
50
|
pkg.need_tar = true
|
data/lib/buildr.rb
CHANGED
data/lib/java/java.rb
CHANGED
@@ -28,51 +28,48 @@ module Buildr
|
|
28
28
|
|
29
29
|
def initialize() #:nodoc:
|
30
30
|
@classpath = [Java.tools_jar].compact
|
31
|
+
if RUBY_PLATFORM == 'java'
|
32
|
+
# in order to get a complete picture, we need to add a few jars to the list.
|
33
|
+
@classpath += java.lang.System.getProperty('java.class.path').split(':').compact
|
34
|
+
end
|
31
35
|
@setup = []
|
36
|
+
|
32
37
|
setup do
|
33
38
|
setup do
|
34
|
-
|
35
|
-
|
36
|
-
map(&:to_s)
|
39
|
+
cp = Buildr.artifacts(@classpath).map(&:to_s)
|
40
|
+
cp.each { |path| file(path).invoke }
|
37
41
|
|
38
|
-
if RUBY_PLATFORM
|
39
|
-
|
40
|
-
Buildr.options.java_args.flatten
|
41
|
-
else
|
42
|
-
classpath.each do |jlib|
|
42
|
+
if RUBY_PLATFORM == 'java'
|
43
|
+
cp.each do |jlib|
|
43
44
|
require jlib
|
44
45
|
end
|
46
|
+
else
|
47
|
+
::Rjb.load cp.join(File::PATH_SEPARATOR), Buildr.options.java_args.flatten
|
45
48
|
end
|
46
49
|
end
|
47
50
|
end
|
48
51
|
end
|
49
52
|
|
50
|
-
|
51
|
-
if RUBY_PLATFORM == 'java'
|
52
|
-
# in order to get a complete picture, we need to add a few jars to the
|
53
|
-
# list.
|
54
|
-
java.lang.System.getProperty('java.class.path').split(':') +
|
55
|
-
@classpath
|
56
|
-
else
|
57
|
-
@classpath
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
attr_writer :classpath
|
53
|
+
attr_accessor :classpath
|
62
54
|
|
63
55
|
def setup(&block)
|
64
56
|
@setup << block
|
65
57
|
self
|
66
58
|
end
|
59
|
+
|
60
|
+
def onload(&block)
|
61
|
+
warn_deprecated "use setup { |wrapper| ... } instead"
|
62
|
+
setup &block
|
63
|
+
end
|
67
64
|
|
68
|
-
def load()
|
65
|
+
def load(&block)
|
69
66
|
@setup.each { |block| block.call self }
|
70
67
|
@setup.clear
|
71
68
|
end
|
72
69
|
|
73
70
|
def import(jlib)
|
74
71
|
if RUBY_PLATFORM == 'java'
|
75
|
-
Java.send(jlib)
|
72
|
+
::Java.send(jlib)
|
76
73
|
else
|
77
74
|
::Rjb.import jlib
|
78
75
|
end
|
@@ -82,7 +79,7 @@ module Buildr
|
|
82
79
|
# these aren't the same, but depending on method_missing while
|
83
80
|
# supporting two unrelated systems is asking for trouble anyways.
|
84
81
|
if RUBY_PLATFORM == 'java'
|
85
|
-
Java.send sym, *args, &block
|
82
|
+
::Java.send sym, *args, &block
|
86
83
|
else
|
87
84
|
::Rjb.send sym, *args, &block
|
88
85
|
end
|
@@ -327,11 +324,14 @@ module Buildr
|
|
327
324
|
# the block, returning its result.
|
328
325
|
#
|
329
326
|
# For example:
|
327
|
+
# # Add class path dependency.
|
330
328
|
# Java.wrapper.classpath << REQUIRES
|
329
|
+
# # Require AntWrap when loading RJB/JRuby.
|
331
330
|
# Java.wrapper.setup { require "antwrap" }
|
332
331
|
#
|
333
332
|
# def execute(name, options)
|
334
333
|
# options = options.merge(:name=>name, :base_dir=>Dir.pwd, :declarative=>true)
|
334
|
+
# # Load RJB/JRuby and run AntWrap.
|
335
335
|
# Java.wrapper { AntProject.new(options) }
|
336
336
|
# end
|
337
337
|
def wrapper()
|
@@ -343,6 +343,11 @@ module Buildr
|
|
343
343
|
end
|
344
344
|
end
|
345
345
|
|
346
|
+
def rjb(&block)
|
347
|
+
warn_deprecated "please use Java.wrapper() instead"
|
348
|
+
wrapper &block
|
349
|
+
end
|
350
|
+
|
346
351
|
# :call-seq:
|
347
352
|
# path_to_bin(cmd?) => path
|
348
353
|
#
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: buildr
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.2.
|
7
|
-
date: 2007-11-
|
6
|
+
version: 1.2.9
|
7
|
+
date: 2007-11-08 00:00:00 -08:00
|
8
8
|
summary: A build system that doesn't suck
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -200,5 +200,5 @@ dependencies:
|
|
200
200
|
requirements:
|
201
201
|
- - ">="
|
202
202
|
- !ruby/object:Gem::Version
|
203
|
-
version: 1.0.
|
203
|
+
version: 1.0.11
|
204
204
|
version:
|