filament 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +26 -0
- data/lib/filament/os.rb +77 -0
- data/lib/filament/package.rb +76 -26
- data/lib/filament/platform.rb +81 -78
- data/lib/filament/target.rb +50 -11
- data/lib/filament/util/filelist2.rb +10 -2
- data/lib/filament/util/fileutils.rb +1 -1
- data/lib/filament.rb +48 -24
- data/plugins/00util/lib/filament/plugins/util.rb +7 -7
- data/plugins/01java/lib/filament/java/mixins/classpath.rb +11 -0
- data/plugins/01java/lib/filament/java/tools/compile.rb +3 -1
- data/plugins/01java/lib/filament/java/tools/execute.rb +3 -1
- data/plugins/01java/lib/filament/java/tools/jar.rb +16 -12
- data/plugins/01java/lib/filament/java/tools/proguard.rb +2 -0
- data/plugins/01java/lib/filament/java/tools.rb +18 -18
- data/plugins/01java/lib/filament/plugins/java.rb +1 -1
- data/plugins/02javame/lib/filament/javame/library.rb +79 -16
- data/plugins/02javame/lib/filament/javame/suite.rb +75 -16
- data/plugins/02javame/lib/filament/javame/tasks/library_task.rb +190 -0
- data/plugins/02javame/lib/filament/javame/tools/emulator.rb +1 -1
- data/plugins/02javame/lib/filament/javame/tools/external/mpp_sdk.rb +0 -1
- data/plugins/02javame/lib/filament/javame/tools/external/wtk.rb +0 -1
- data/plugins/02javame/lib/filament/javame/{platform.rb → tools/platform.rb} +6 -5
- data/plugins/02javame/lib/filament/javame/tools/preverifier.rb +1 -1
- data/plugins/02javame/lib/filament/javame/tools.rb +1 -1
- data/plugins/02javame/lib/init.rb +6 -19
- data/plugins/04spin/lib/filament/spin/sji.rb +36 -0
- data/plugins/04spin/lib/filament/spin/tasks/sji_task.rb +86 -0
- data/plugins/04spin/lib/init.rb +4 -0
- data/plugins/04spin/lib/spin/sji.rb +339 -0
- data/plugins/05push/lib/filament/plugins/push.rb +3 -3
- data/plugins/10svn/lib/filament/plugins/svn.rb +3 -3
- data/plugins/10svn/lib/filament/scm/svn.rb +7 -13
- data/plugins/10svn/lib/init.rb +1 -1
- data/plugins/11http/lib/filament/plugins/http.rb +6 -0
- data/plugins/11http/lib/filament/scm/http.rb +67 -0
- data/plugins/11http/lib/init.rb +5 -0
- metadata +34 -8
- data/lib/filament/artifact.rb +0 -49
- data/plugins/01java/lib/filament/java/mixins/java_mixin.rb +0 -19
- data/plugins/02javame/lib/filament/javame/mixins/library_mixin.rb +0 -181
- data/plugins/02javame/lib/filament/javame/mixins/suite_mixin.rb +0 -114
@@ -0,0 +1,339 @@
|
|
1
|
+
require 'erb'
|
2
|
+
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
module Spin
|
6
|
+
class SpinJavaInterface
|
7
|
+
def initialize
|
8
|
+
@prototypes = {}
|
9
|
+
@anonymous_prototypes = []
|
10
|
+
end
|
11
|
+
|
12
|
+
def prototypes
|
13
|
+
return @prototypes.values + @anonymous_prototypes
|
14
|
+
end
|
15
|
+
|
16
|
+
def prototype(name=nil, *args, &block)
|
17
|
+
if name.nil?
|
18
|
+
@anonymous_prototypes << p = Prototype.new(name, *args)
|
19
|
+
else
|
20
|
+
p = @prototypes[name] ||= Prototype.new(name, *args)
|
21
|
+
end
|
22
|
+
|
23
|
+
p.instance_eval(&block)
|
24
|
+
end
|
25
|
+
|
26
|
+
def load(path)
|
27
|
+
instance_eval(Pathname.new(path).read, path)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
class Prototype
|
32
|
+
attr_accessor2 :java_type, :java_imports
|
33
|
+
|
34
|
+
attr_reader :java_bindings, :name, :package
|
35
|
+
|
36
|
+
def initialize(name)
|
37
|
+
@@id ||= 0
|
38
|
+
@id = @@id
|
39
|
+
@@id += 1
|
40
|
+
|
41
|
+
if name.nil?
|
42
|
+
@name = "Anon#{@id}"
|
43
|
+
@anonymous = true
|
44
|
+
else
|
45
|
+
@name = name
|
46
|
+
@anonymous = false
|
47
|
+
end
|
48
|
+
|
49
|
+
@package = ''
|
50
|
+
@java_bindings = []
|
51
|
+
@java_imports = []
|
52
|
+
@java_type = nil
|
53
|
+
end
|
54
|
+
|
55
|
+
def java_import(*args)
|
56
|
+
@java_imports += args
|
57
|
+
end
|
58
|
+
|
59
|
+
def anonymous?
|
60
|
+
return @anonymous
|
61
|
+
end
|
62
|
+
|
63
|
+
def bind(*args, &block)
|
64
|
+
b = JavaMethodBinding.new(*args)
|
65
|
+
|
66
|
+
b.java_type(@java_type) unless @java_type.nil?
|
67
|
+
|
68
|
+
b.instance_eval(&block)
|
69
|
+
@java_bindings << b
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
class JavaMethodBinding
|
74
|
+
attr_accessor2 :spin_method, :java_type, :java_method, :java_params, :java_return_type,
|
75
|
+
:spin_doc, :java_code, :is_special_form
|
76
|
+
|
77
|
+
attr_reader :id
|
78
|
+
|
79
|
+
def initialize(spin_method)
|
80
|
+
@@id ||= -100
|
81
|
+
@id = @@id
|
82
|
+
@@id += -1
|
83
|
+
|
84
|
+
@spin_method = spin_method
|
85
|
+
@java_return_type = nil
|
86
|
+
@spin_doc = ''
|
87
|
+
@java_code = ''
|
88
|
+
@is_special_form = false
|
89
|
+
@min_args = nil
|
90
|
+
@max_args = nil
|
91
|
+
end
|
92
|
+
|
93
|
+
def void?
|
94
|
+
@java_return_type.to_s == 'void'
|
95
|
+
end
|
96
|
+
|
97
|
+
def java_impl_delegate
|
98
|
+
return "sji_#{id.abs}"
|
99
|
+
end
|
100
|
+
|
101
|
+
def min_args
|
102
|
+
return @min_args || @java_params.length
|
103
|
+
end
|
104
|
+
|
105
|
+
def max_args
|
106
|
+
return @max_args || @java_params.length
|
107
|
+
end
|
108
|
+
|
109
|
+
|
110
|
+
def java_method_call
|
111
|
+
arguments = []
|
112
|
+
|
113
|
+
java_params.each_with_index do |p, i|
|
114
|
+
h = JAVA_PRIMITIVES[p]
|
115
|
+
if h.nil?
|
116
|
+
cast_to = p
|
117
|
+
unbox = ''
|
118
|
+
else
|
119
|
+
cast_to = h[:classname]
|
120
|
+
unbox = h[:unbox]
|
121
|
+
end
|
122
|
+
|
123
|
+
arguments << "((#{cast_to}) arguments.elementAt(#{i}))#{unbox}"
|
124
|
+
end
|
125
|
+
|
126
|
+
if java_method == :constructor
|
127
|
+
mc = "new #{java_type}"
|
128
|
+
else
|
129
|
+
mc = "((#{java_type}) target).#{java_method}"
|
130
|
+
end
|
131
|
+
mc << "(#{arguments.join(', ')})"
|
132
|
+
|
133
|
+
h = JAVA_PRIMITIVES[java_return_type]
|
134
|
+
if h.nil?
|
135
|
+
return mc
|
136
|
+
else
|
137
|
+
return h[:box].gsub(/%/, mc)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
def java_body
|
142
|
+
s = "#{java_code}\n"
|
143
|
+
|
144
|
+
if void?
|
145
|
+
s << "#{java_method_call};"
|
146
|
+
s << "return null;"
|
147
|
+
else
|
148
|
+
s << "return #{java_method_call};"
|
149
|
+
end
|
150
|
+
|
151
|
+
return s.gsub(/^/, ' ')
|
152
|
+
end
|
153
|
+
|
154
|
+
def num_args(min, max=nil)
|
155
|
+
if max.nil?
|
156
|
+
@min_args = min
|
157
|
+
@max_args = min
|
158
|
+
else
|
159
|
+
min = normalize(min)
|
160
|
+
max = normalize(max)
|
161
|
+
|
162
|
+
raise "min cannot be greater than max (#{min} > #{max})" if min > max
|
163
|
+
|
164
|
+
@min_args = min
|
165
|
+
@max_args = max
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
def verify
|
170
|
+
raise 'spin_method must be set' if spin_method.nil?
|
171
|
+
raise 'java_type must be set' if java_type.nil?
|
172
|
+
raise 'java_method must be set' if java_method.nil?
|
173
|
+
raise 'id must be set' if id.nil?
|
174
|
+
end
|
175
|
+
|
176
|
+
private
|
177
|
+
def normalize(n)
|
178
|
+
return n == :any ? 4_294_967_295 : n
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
######################################
|
183
|
+
|
184
|
+
JAVA_PRIMITIVES = {}
|
185
|
+
|
186
|
+
def self.java_primitive(name, classname, unbox, box)
|
187
|
+
h = JAVA_PRIMITIVES[name] ||= {}
|
188
|
+
h[:classname] = classname
|
189
|
+
h[:unbox] = unbox
|
190
|
+
h[:box] = box
|
191
|
+
end
|
192
|
+
|
193
|
+
java_primitive 'int', 'Integer', '.intValue()', 'new Integer(%)'
|
194
|
+
java_primitive 'double', 'Double', '.doubleValue()', 'new Double(%)'
|
195
|
+
java_primitive 'boolean', 'Boolean', '.booleanValue()', '(%) ? SpinUtil.TRUE : SpinUtil.FALSE'
|
196
|
+
java_primitive 'float', 'Float', '.floatValue()', 'new Float(%)'
|
197
|
+
java_primitive 'char', 'Character', '.charValue()', 'new Character(%)'
|
198
|
+
java_primitive 'byte', 'Byte', '.byteValue()', 'new Byte(%)'
|
199
|
+
|
200
|
+
class JavaMethodImpl
|
201
|
+
attr_accessor :java_impl_class_name, :java_impl_package,
|
202
|
+
:java_type_name, :spin_package, :spin_prototype_name
|
203
|
+
attr_reader :methods, :java_imports
|
204
|
+
|
205
|
+
def initialize(prototype)
|
206
|
+
@methods = []
|
207
|
+
@java_imports = []
|
208
|
+
|
209
|
+
@java_impl_class_name = "SJI#{prototype.name.capitalize}"
|
210
|
+
|
211
|
+
@java_type_name = prototype.java_type
|
212
|
+
@spin_package = prototype.package
|
213
|
+
@spin_prototype_name = prototype.name
|
214
|
+
|
215
|
+
@java_imports.push(*prototype.java_imports)
|
216
|
+
|
217
|
+
prototype.java_bindings.each do |binding|
|
218
|
+
@methods << binding
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
def verify
|
223
|
+
raise 'java_impl_class_name' if java_impl_class_name.nil?
|
224
|
+
raise 'java_impl_package must be set' if java_impl_package.nil?
|
225
|
+
|
226
|
+
raise 'methods cannot be empty' if methods.empty?
|
227
|
+
|
228
|
+
methods.each {|method| method.verify}
|
229
|
+
end
|
230
|
+
|
231
|
+
def full_class_name
|
232
|
+
return "#{java_impl_package}.#{java_impl_class_name}"
|
233
|
+
end
|
234
|
+
|
235
|
+
def spin
|
236
|
+
verify
|
237
|
+
rspin = ERB.new(spin_template, 0, '%<>')
|
238
|
+
return rspin.result(binding)
|
239
|
+
end
|
240
|
+
|
241
|
+
def java
|
242
|
+
verify
|
243
|
+
rjava = ERB.new(java_template, 0, '%<>')
|
244
|
+
return rjava.result(binding)
|
245
|
+
end
|
246
|
+
|
247
|
+
def write_spin(base)
|
248
|
+
FileUtils.mkdir_p(spin_dir(base))
|
249
|
+
|
250
|
+
open(spin_file(base), 'w') {|io| io.write(spin)}
|
251
|
+
end
|
252
|
+
|
253
|
+
def write_java(base)
|
254
|
+
FileUtils.mkdir_p(java_dir(base))
|
255
|
+
|
256
|
+
open(java_file(base), 'w') {|io| io.write(java)}
|
257
|
+
end
|
258
|
+
|
259
|
+
def java_dir(base)
|
260
|
+
verify
|
261
|
+
return "#{base}/#{java_impl_package.gsub(/\./, '/')}"
|
262
|
+
end
|
263
|
+
|
264
|
+
def spin_dir(base)
|
265
|
+
verify
|
266
|
+
return "#{base}/#{spin_package}"
|
267
|
+
end
|
268
|
+
|
269
|
+
def java_file(base)
|
270
|
+
return "#{java_dir(base)}/#{java_impl_class_name}.java"
|
271
|
+
end
|
272
|
+
|
273
|
+
def spin_file(base)
|
274
|
+
return "#{spin_dir(base)}/#{spin_prototype_name.downcase}.spin"
|
275
|
+
end
|
276
|
+
|
277
|
+
def spin_template
|
278
|
+
return %q{
|
279
|
+
% for method in methods
|
280
|
+
# <%=method.spin_doc%>
|
281
|
+
|
282
|
+
% end
|
283
|
+
}.gsub(/^ /, '')
|
284
|
+
end
|
285
|
+
|
286
|
+
def java_template
|
287
|
+
return %q{package <%= java_impl_package %>;
|
288
|
+
|
289
|
+
% for import in java_imports
|
290
|
+
import <%= import %>;
|
291
|
+
% end
|
292
|
+
import com.software4i.spin.object.ISpinObject;
|
293
|
+
import com.software4i.spin.interpreter.ISpinObjectManager;
|
294
|
+
import com.software4i.spin.interpreter.Interpreter;
|
295
|
+
import com.software4i.spin.java.AbstractJavaMethodImpl;
|
296
|
+
import com.software4i.spin.java.IJavaMethodImpl;
|
297
|
+
import com.software4i.spin.util.IList;
|
298
|
+
|
299
|
+
public class <%=java_impl_class_name%> extends AbstractJavaMethodImpl implements IJavaMethodImpl {
|
300
|
+
public <%=java_impl_class_name%>() {
|
301
|
+
super("<%=java_type_name%>");
|
302
|
+
}
|
303
|
+
|
304
|
+
public Object applyNative(
|
305
|
+
Object target,
|
306
|
+
int id,
|
307
|
+
Interpreter interpreter,
|
308
|
+
Object caller,
|
309
|
+
IList arguments) {
|
310
|
+
|
311
|
+
ISpinObjectManager manager = interpreter.getSpinObjectManager();
|
312
|
+
ISpinObject spinObject = manager.spinObjectFor(target);
|
313
|
+
|
314
|
+
switch (id) {
|
315
|
+
<% for m in methods %>
|
316
|
+
case <%= m.id %>:
|
317
|
+
return <%=m.java_impl_delegate%>(interpreter, target, caller, arguments);
|
318
|
+
<% end %>
|
319
|
+
}
|
320
|
+
|
321
|
+
return nativeMissing(id);
|
322
|
+
}
|
323
|
+
|
324
|
+
// name, specialForm, [MIN/MAX/EXACT], numArgs
|
325
|
+
public void createMethods() {
|
326
|
+
<% for m in methods %> createMethod(<%=m.id%>, "<%=m.spin_method%>", <%=m.is_special_form ? 'true' : 'false'%>, <%=m.min_args%>, <%=m.max_args%>);
|
327
|
+
<% end %>
|
328
|
+
}
|
329
|
+
|
330
|
+
<% for m in methods %>
|
331
|
+
private Object <%=m.java_impl_delegate%>(Interpreter interpreter, Object target, Object caller, IList arguments) {
|
332
|
+
<%= m.java_body %>
|
333
|
+
}
|
334
|
+
<% end %>
|
335
|
+
}
|
336
|
+
}.gsub(/^ /, '')
|
337
|
+
end
|
338
|
+
end
|
339
|
+
end
|
@@ -1,15 +1,15 @@
|
|
1
1
|
require 'filament/plugin'
|
2
2
|
|
3
3
|
module Filament::Plugins
|
4
|
-
class Push < Plugin
|
4
|
+
class Push < Filament::Plugin
|
5
5
|
def initialize(app)
|
6
6
|
app.subcommand('push', "Pushes deployables to selected PUSH_CONDUIT") do |args|
|
7
|
-
targets = TargetList.new(*args)
|
7
|
+
targets = Filament::TargetList.new(*args)
|
8
8
|
push_conduit = ENV['PUSH_CONDUIT'] || :Filter
|
9
9
|
|
10
10
|
targets.each do |target|
|
11
11
|
target.build do
|
12
|
-
klass =
|
12
|
+
klass = Filament::Push::Conduits.module_eval(push_conduit.to_s + 'Conduit')
|
13
13
|
conduit = klass.new
|
14
14
|
conduit.push_targets(targets)
|
15
15
|
end
|
@@ -1,17 +1,17 @@
|
|
1
1
|
require 'svn'
|
2
2
|
|
3
3
|
module Filament::Plugins
|
4
|
-
class SvnPlugin < Plugin
|
4
|
+
class SvnPlugin < Filament::Plugin
|
5
5
|
def initialize(app)
|
6
6
|
app.subcommand('update', "Updates given package and subpackages") do |args|
|
7
|
-
packages = PackageList.new(*args)
|
7
|
+
packages = Filament::PackageList.new(*args)
|
8
8
|
packages.each do |package|
|
9
9
|
package.scm.update
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
app.subcommand('status', "Shows status given of package and subpackages") do |args|
|
14
|
-
packages = PackageList.new(*args)
|
14
|
+
packages = Filament::PackageList.new(*args)
|
15
15
|
packages.each do |package|
|
16
16
|
package.scm.status
|
17
17
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'filament/package'
|
2
2
|
|
3
|
-
module Filament::
|
4
|
-
class
|
3
|
+
module Filament::SCM
|
4
|
+
class SVN < Base
|
5
5
|
# returns true if this package is under svn control
|
6
|
-
def self.applies?(
|
7
|
-
p =
|
6
|
+
def self.applies?(realpath)
|
7
|
+
p = realpath + '.svn'
|
8
8
|
return p.exist?
|
9
9
|
end
|
10
10
|
|
@@ -31,26 +31,20 @@ module Filament::Scm
|
|
31
31
|
# if this package is under version control, it will update it
|
32
32
|
# if this package has subpackages, it will update them
|
33
33
|
def update
|
34
|
-
|
35
|
-
system("svn update #{@package.realpath}")
|
36
|
-
super
|
34
|
+
system("svn update #{@realpath}")
|
37
35
|
end
|
38
36
|
|
39
37
|
# if this package is under version control, it will print its status
|
40
38
|
# if this package has subpackages it will print their status
|
41
39
|
def status
|
42
|
-
|
43
|
-
system("svn status #{@package.realpath}")
|
44
|
-
super
|
40
|
+
system("svn status #{@realpath}")
|
45
41
|
end
|
46
42
|
|
47
43
|
# if this package is under version control, it will commit it with the
|
48
44
|
# given msg
|
49
45
|
# if this package has subpackages it will commit them
|
50
46
|
def commit(msg)
|
51
|
-
|
52
|
-
system("svn ci -m '#{msg.gsub(/"/,"\\\"")}'")
|
53
|
-
super(msg)
|
47
|
+
system("svn ci -m '#{msg.gsub(/"/,"\\\"")}' #{@realpath}")
|
54
48
|
end
|
55
49
|
|
56
50
|
def svn_url
|
data/plugins/10svn/lib/init.rb
CHANGED
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'uri'
|
2
|
+
require 'open-uri'
|
3
|
+
require 'pathname'
|
4
|
+
require 'fileutils'
|
5
|
+
require 'rubygems'
|
6
|
+
require 'mechanize'
|
7
|
+
|
8
|
+
require 'filament/package'
|
9
|
+
|
10
|
+
module Filament::SCM
|
11
|
+
class HTTPCrawl < Base
|
12
|
+
|
13
|
+
def self.scm_type
|
14
|
+
return 'http/crawl'
|
15
|
+
end
|
16
|
+
|
17
|
+
# returns true if this package is under svn control
|
18
|
+
# def self.applies?(package)
|
19
|
+
# return package.scm_type == scm_type
|
20
|
+
# end
|
21
|
+
|
22
|
+
def initialize(realpath, url)
|
23
|
+
super(realpath)
|
24
|
+
@url = url
|
25
|
+
end
|
26
|
+
|
27
|
+
# downloads a particular url to a given local_path
|
28
|
+
def download_url(url, local_path)
|
29
|
+
begin
|
30
|
+
File.open(local_path, 'w') do |f|
|
31
|
+
data = open(url) { |io| io.read }
|
32
|
+
f.write(data)
|
33
|
+
end
|
34
|
+
rescue Exception => ex
|
35
|
+
puts "!!! Error Downloading #{url}: " + ex.message
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# returns the absolute url for a given cur_page
|
40
|
+
def to_absolute_uri(url, cur_page)
|
41
|
+
if url.is_a?(URI)
|
42
|
+
uri = url
|
43
|
+
else
|
44
|
+
uri = URI.parse(url)
|
45
|
+
end
|
46
|
+
|
47
|
+
# construct an absolute uri
|
48
|
+
if uri.relative?
|
49
|
+
uri = cur_page.uri + url
|
50
|
+
end
|
51
|
+
|
52
|
+
return uri
|
53
|
+
end
|
54
|
+
|
55
|
+
def update
|
56
|
+
agent = WWW::Mechanize.new #{ |a| a.log = Logger.new(STDERR) }
|
57
|
+
page = agent.get(@url)
|
58
|
+
|
59
|
+
page.links.each do |link|
|
60
|
+
url = to_absolute_uri(link.href, page)
|
61
|
+
local_path = @realpath + Pathname.new(link.href).basename
|
62
|
+
puts "Downloading #{url} to #{local_path} .."
|
63
|
+
download_url(url, local_path)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: filament
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2006-03
|
6
|
+
version: 0.3.0
|
7
|
+
date: 2006-04-03 00:00:00 -04:00
|
8
8
|
summary: A flexible dependency-based build platform based on Rake
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -36,8 +36,8 @@ files:
|
|
36
36
|
- lib/filament
|
37
37
|
- lib/filament.rb
|
38
38
|
- lib/inflector.rb
|
39
|
-
- lib/filament/artifact.rb
|
40
39
|
- lib/filament/context.rb
|
40
|
+
- lib/filament/os.rb
|
41
41
|
- lib/filament/package.rb
|
42
42
|
- lib/filament/platform.rb
|
43
43
|
- lib/filament/plugin.rb
|
@@ -51,8 +51,10 @@ files:
|
|
51
51
|
- plugins/00util
|
52
52
|
- plugins/01java
|
53
53
|
- plugins/02javame
|
54
|
+
- plugins/04spin
|
54
55
|
- plugins/05push
|
55
56
|
- plugins/10svn
|
57
|
+
- plugins/11http
|
56
58
|
- plugins/00util/lib
|
57
59
|
- plugins/00util/lib/filament
|
58
60
|
- plugins/00util/lib/init.rb
|
@@ -66,7 +68,7 @@ files:
|
|
66
68
|
- plugins/01java/lib/filament/java/mixins
|
67
69
|
- plugins/01java/lib/filament/java/tools
|
68
70
|
- plugins/01java/lib/filament/java/tools.rb
|
69
|
-
- plugins/01java/lib/filament/java/mixins/
|
71
|
+
- plugins/01java/lib/filament/java/mixins/classpath.rb
|
70
72
|
- plugins/01java/lib/filament/java/tools/compile.rb
|
71
73
|
- plugins/01java/lib/filament/java/tools/execute.rb
|
72
74
|
- plugins/01java/lib/filament/java/tools/jar.rb
|
@@ -77,20 +79,28 @@ files:
|
|
77
79
|
- plugins/02javame/lib/init.rb
|
78
80
|
- plugins/02javame/lib/filament/javame
|
79
81
|
- plugins/02javame/lib/filament/javame/library.rb
|
80
|
-
- plugins/02javame/lib/filament/javame/mixins
|
81
|
-
- plugins/02javame/lib/filament/javame/platform.rb
|
82
82
|
- plugins/02javame/lib/filament/javame/suite.rb
|
83
|
+
- plugins/02javame/lib/filament/javame/tasks
|
83
84
|
- plugins/02javame/lib/filament/javame/tasks.rb
|
84
85
|
- plugins/02javame/lib/filament/javame/tools
|
85
86
|
- plugins/02javame/lib/filament/javame/tools.rb
|
86
|
-
- plugins/02javame/lib/filament/javame/
|
87
|
-
- plugins/02javame/lib/filament/javame/mixins/suite_mixin.rb
|
87
|
+
- plugins/02javame/lib/filament/javame/tasks/library_task.rb
|
88
88
|
- plugins/02javame/lib/filament/javame/tools/descriptor.rb
|
89
89
|
- plugins/02javame/lib/filament/javame/tools/emulator.rb
|
90
90
|
- plugins/02javame/lib/filament/javame/tools/external
|
91
|
+
- plugins/02javame/lib/filament/javame/tools/platform.rb
|
91
92
|
- plugins/02javame/lib/filament/javame/tools/preverifier.rb
|
92
93
|
- plugins/02javame/lib/filament/javame/tools/external/mpp_sdk.rb
|
93
94
|
- plugins/02javame/lib/filament/javame/tools/external/wtk.rb
|
95
|
+
- plugins/04spin/lib
|
96
|
+
- plugins/04spin/lib/filament
|
97
|
+
- plugins/04spin/lib/init.rb
|
98
|
+
- plugins/04spin/lib/spin
|
99
|
+
- plugins/04spin/lib/filament/spin
|
100
|
+
- plugins/04spin/lib/filament/spin/sji.rb
|
101
|
+
- plugins/04spin/lib/filament/spin/tasks
|
102
|
+
- plugins/04spin/lib/filament/spin/tasks/sji_task.rb
|
103
|
+
- plugins/04spin/lib/spin/sji.rb
|
94
104
|
- plugins/05push/lib
|
95
105
|
- plugins/05push/lib/bluetooth.rb
|
96
106
|
- plugins/05push/lib/filament
|
@@ -111,6 +121,13 @@ files:
|
|
111
121
|
- plugins/10svn/lib/filament/scm
|
112
122
|
- plugins/10svn/lib/filament/plugins/svn.rb
|
113
123
|
- plugins/10svn/lib/filament/scm/svn.rb
|
124
|
+
- plugins/11http/lib
|
125
|
+
- plugins/11http/lib/filament
|
126
|
+
- plugins/11http/lib/init.rb
|
127
|
+
- plugins/11http/lib/filament/plugins
|
128
|
+
- plugins/11http/lib/filament/scm
|
129
|
+
- plugins/11http/lib/filament/plugins/http.rb
|
130
|
+
- plugins/11http/lib/filament/scm/http.rb
|
114
131
|
- README
|
115
132
|
- CHANGELOG
|
116
133
|
test_files: []
|
@@ -154,3 +171,12 @@ dependencies:
|
|
154
171
|
- !ruby/object:Gem::Version
|
155
172
|
version: 1.2.2
|
156
173
|
version:
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: mechanize
|
176
|
+
version_requirement:
|
177
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: 0.3.1
|
182
|
+
version:
|
data/lib/filament/artifact.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
require 'filament/package'
|
2
|
-
require 'filament/target'
|
3
|
-
|
4
|
-
module Filament
|
5
|
-
class Artifact < Target
|
6
|
-
attr_reader :directories, :name
|
7
|
-
attr_accessor :weak_deps, :deps, :package
|
8
|
-
|
9
|
-
def initialize(name, &block)
|
10
|
-
@directories = []
|
11
|
-
@tasks = []
|
12
|
-
|
13
|
-
super(:name => name) do
|
14
|
-
build_artifact
|
15
|
-
end
|
16
|
-
|
17
|
-
init
|
18
|
-
instance_eval(&block)
|
19
|
-
end
|
20
|
-
|
21
|
-
def init; end
|
22
|
-
|
23
|
-
def working_dir
|
24
|
-
return "#{$context[:working_dir]}/#{package.path}/#{name}"
|
25
|
-
end
|
26
|
-
|
27
|
-
def output_dir
|
28
|
-
return "#{$context[:output_dir]}/#{package.path}"
|
29
|
-
end
|
30
|
-
|
31
|
-
alias :orig_directory :directory
|
32
|
-
def directory(path, is_working_dir=true)
|
33
|
-
path = "#{working_dir}/#{path}" if is_working_dir
|
34
|
-
@directories << path
|
35
|
-
orig_directory(path)
|
36
|
-
return path
|
37
|
-
end
|
38
|
-
|
39
|
-
def invoke_tasks
|
40
|
-
# make output directory
|
41
|
-
mkdir_p(output_dir) unless File.exist?(output_dir)
|
42
|
-
|
43
|
-
# invoke them all
|
44
|
-
@tasks.each do |t|
|
45
|
-
t.invoke
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Filament::Java::Mixins
|
2
|
-
module JavaMixin
|
3
|
-
def init_java
|
4
|
-
end
|
5
|
-
|
6
|
-
def classpath(target)
|
7
|
-
cp = @classpath
|
8
|
-
all_deps = TargetList.new
|
9
|
-
all_deps << target.flattened_deps
|
10
|
-
all_deps << target.weak_deps
|
11
|
-
all_deps.each do |d|
|
12
|
-
jar = d[:jar]
|
13
|
-
# only add the jar if this dependecy has one
|
14
|
-
cp << jar unless jar.nil?
|
15
|
-
end
|
16
|
-
return cp
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|