swung-weave-buildr 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/buildr/swung_weave/version.rb +1 -1
- data/lib/swung_weave_buildr.rb +16 -6
- metadata +3 -3
data/lib/swung_weave_buildr.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'buildr'
|
2
2
|
require 'buildr/java'
|
3
3
|
require 'buildr/swung_weave/version'
|
4
|
+
require 'tempfile'
|
4
5
|
|
5
6
|
module Buildr
|
6
7
|
module SwungWeave
|
@@ -11,13 +12,22 @@ module Buildr
|
|
11
12
|
end
|
12
13
|
|
13
14
|
def enhance(dir)
|
14
|
-
args = Dir["#{dir}/**/*.class"]
|
15
|
-
args << "-d"
|
16
|
-
args << dir
|
17
|
-
args << "--verbose"
|
18
|
-
args << "--debug" if Buildr.application.options.trace
|
19
15
|
cp = Buildr.artifacts(requires).each(&:invoke).map(&:to_s)
|
20
|
-
|
16
|
+
tf = Tempfile.open('swung_weave')
|
17
|
+
begin
|
18
|
+
tf << Dir["#{dir}/**/*.class"].join("\n")
|
19
|
+
tf.close
|
20
|
+
args = []
|
21
|
+
args << "@#{tf.path}"
|
22
|
+
args << "-d"
|
23
|
+
args << dir
|
24
|
+
args << "--verbose"
|
25
|
+
args << "--debug" if Buildr.application.options.trace
|
26
|
+
|
27
|
+
Java::Commands.java 'org.realityforge.swung_weave.tool.Main', *(args + [{:classpath => cp}])
|
28
|
+
rescue
|
29
|
+
tf.close!
|
30
|
+
end
|
21
31
|
end
|
22
32
|
|
23
33
|
# Repositories containing the requirements
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 9
|
9
|
+
version: 1.0.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Peter Donald
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-10-08 00:00:00 +11:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|