ruboto 0.11.0.rc.0 → 0.11.0.rc.1
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/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/assets/rakelib/ruboto.rake +1 -1
- data/lib/ruboto/commands/base.rb +78 -78
- data/lib/ruboto/util/update.rb +8 -115
- data/lib/ruboto/version.rb +1 -1
- data/test/activity/startup_exception_activity.rb +0 -5
- data/test/activity/view_constants_activity_test.rb +3 -3
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -14,7 +14,7 @@ Getting Started
|
|
14
14
|
Before you use Ruboto, you should do the following things:
|
15
15
|
|
16
16
|
* Install the JDK if it's not on your system already
|
17
|
-
* Install [jruby](http://jruby.org/) if you don't already have it. JRuby has a [very easy install process](http://jruby.org/#2), or you can use [rvm](
|
17
|
+
* Install [jruby](http://jruby.org/) if you don't already have it. JRuby has a [very easy install process](http://jruby.org/#2), or you can use [rvm](https://rvm.io/rvm/install/)
|
18
18
|
* Install [the Android SDK](http://developer.android.com/sdk/index.html)
|
19
19
|
* Add the sdk to `$ANDROID_HOME` as an absolute path (Java does not expand tildes `~`)
|
20
20
|
* Add the sdk's `tools/` and `platform-tools/` directory to your `$PATH`
|
data/Rakefile
CHANGED
data/assets/rakelib/ruboto.rake
CHANGED
@@ -695,7 +695,7 @@ def start_emulator
|
|
695
695
|
|
696
696
|
unless File.exists? "#{ENV['HOME']}/.android/avd/#{avd_name}.avd"
|
697
697
|
puts "Creating AVD #{avd_name}"
|
698
|
-
heap_size = File.read('AndroidManifest.xml') =~
|
698
|
+
heap_size = (File.read('AndroidManifest.xml') =~ /largeHeap/) ? 256 : 48
|
699
699
|
# FIXME(uwe): Use Ruby instead.
|
700
700
|
# FIXME(uwe): Only change the heap size to be larger.
|
701
701
|
# `sed -i.bak -e "s/vm.heapSize=[0-9]*/vm.heapSize=#{heap_size}/" #{ENV['ANDROID_HOME']}/platforms/*/*/*/hardware.ini`
|
data/lib/ruboto/commands/base.rb
CHANGED
@@ -21,41 +21,41 @@ module Ruboto
|
|
21
21
|
|
22
22
|
def self.main
|
23
23
|
Main {
|
24
|
-
mode
|
25
|
-
mode
|
24
|
+
mode 'gen' do
|
25
|
+
mode 'app' do
|
26
26
|
include Ruboto::Util::LogAction
|
27
27
|
include Ruboto::Util::Build
|
28
28
|
include Ruboto::Util::Update
|
29
29
|
include Ruboto::Util::Verify
|
30
30
|
|
31
|
-
option(
|
31
|
+
option('package'){
|
32
32
|
required
|
33
33
|
argument :required
|
34
|
-
description
|
34
|
+
description 'Name of package. Must be unique for every app. A common pattern is yourtld.yourdomain.appname (Ex. org.ruboto.irb)'
|
35
35
|
}
|
36
|
-
option(
|
36
|
+
option('name'){
|
37
37
|
argument :required
|
38
|
-
description
|
38
|
+
description 'Name of your app. Defaults to the last part of the package name capitalized.'
|
39
39
|
}
|
40
|
-
option(
|
40
|
+
option('activity'){
|
41
41
|
argument :required
|
42
|
-
description
|
42
|
+
description 'Name of your primary Activity. Defaults to the name of the application with Activity appended.'
|
43
43
|
}
|
44
|
-
option(
|
44
|
+
option('path'){
|
45
45
|
argument :required
|
46
|
-
description
|
46
|
+
description 'Path to where you want your app. Defaults to the last part of the package name.'
|
47
47
|
}
|
48
|
-
option(
|
48
|
+
option('target') {
|
49
49
|
argument :required
|
50
50
|
defaults DEFAULT_TARGET_SDK
|
51
51
|
description "Android version to target. Must begin with 'android-' (e.g., 'android-8' for froyo)"
|
52
52
|
}
|
53
|
-
option(
|
53
|
+
option('min-sdk') {
|
54
54
|
argument :required
|
55
55
|
description "Minimum android version supported. Must begin with 'android-'."
|
56
56
|
}
|
57
|
-
option(
|
58
|
-
description
|
57
|
+
option('with-jruby') {
|
58
|
+
description 'Generate the JRuby jars jar'
|
59
59
|
cast :boolean
|
60
60
|
}
|
61
61
|
option('force') {
|
@@ -83,7 +83,7 @@ module Ruboto
|
|
83
83
|
system "android create project -n #{name} -t #{target} -p #{path} -k #{package} -a #{activity}"
|
84
84
|
exit $? unless $? == 0
|
85
85
|
unless File.exists? path
|
86
|
-
puts
|
86
|
+
puts 'Android project was not created'
|
87
87
|
exit_failure!
|
88
88
|
end
|
89
89
|
Dir.chdir path do
|
@@ -92,9 +92,9 @@ module Ruboto
|
|
92
92
|
FileUtils.rm_f 'res/layout/main.xml'
|
93
93
|
puts 'Removed file res/layout/main.xml'
|
94
94
|
verify_strings.root.elements['string'].text = name.gsub(/([A-Z]+)([A-Z][a-z])/,'\1 \2').gsub(/([a-z\d])([A-Z])/,'\1 \2')
|
95
|
-
File.open(
|
95
|
+
File.open('res/values/strings.xml', 'w') {|f| verify_strings.document.write(f, 4)}
|
96
96
|
end
|
97
|
-
puts
|
97
|
+
puts 'Done'
|
98
98
|
|
99
99
|
Dir.chdir root do
|
100
100
|
update_manifest min_sdk[/\d+/], target[/\d+/], true
|
@@ -107,8 +107,8 @@ module Ruboto
|
|
107
107
|
update_dx_jar true if with_jruby
|
108
108
|
update_core_classes 'include'
|
109
109
|
|
110
|
-
log_action(
|
111
|
-
generate_inheriting_file
|
110
|
+
log_action('Generating the default Activity and script') do
|
111
|
+
generate_inheriting_file 'Activity', activity, package
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
@@ -116,7 +116,7 @@ module Ruboto
|
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
119
|
-
mode
|
119
|
+
mode 'jruby' do
|
120
120
|
include Ruboto::Util::LogAction
|
121
121
|
include Ruboto::Util::Build
|
122
122
|
include Ruboto::Util::Update
|
@@ -127,26 +127,26 @@ module Ruboto
|
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
|
-
mode
|
130
|
+
mode 'class' do
|
131
131
|
include Ruboto::Util::Build
|
132
132
|
include Ruboto::Util::Verify
|
133
133
|
|
134
|
-
argument(
|
134
|
+
argument('class'){
|
135
135
|
required
|
136
|
-
alternatives = Dir[File.join(Ruboto::ASSETS,
|
136
|
+
alternatives = Dir[File.join(Ruboto::ASSETS, 'src/Inheriting*.java')].map{|f| File.basename(f)[10..-6]} - %w(Class)
|
137
137
|
description "the Android Class that you want: #{alternatives[0..-2].map{|c| "#{c}, "}}or #{alternatives[-1]}"
|
138
138
|
validate {|v| alternatives.include? v}
|
139
139
|
}
|
140
140
|
|
141
|
-
option(
|
141
|
+
option('script_name'){
|
142
142
|
argument :required
|
143
|
-
description
|
143
|
+
description 'name of the ruby script that this class will execute. Should end in .rb. Optional.'
|
144
144
|
}
|
145
145
|
|
146
|
-
option(
|
146
|
+
option('name'){
|
147
147
|
required
|
148
148
|
argument :required
|
149
|
-
description
|
149
|
+
description 'name of the class (and file). Should be CamelCase'
|
150
150
|
}
|
151
151
|
|
152
152
|
def run
|
@@ -163,7 +163,7 @@ module Ruboto
|
|
163
163
|
if app_element.elements["#{tag}[@android:name='#{name}']"]
|
164
164
|
puts "#{klass} already present in manifest."
|
165
165
|
else
|
166
|
-
app_element.add_element tag, {
|
166
|
+
app_element.add_element tag, {'android:name' => "#{"#{verify_package}." if klass == 'Service'}#{name}"}
|
167
167
|
save_manifest
|
168
168
|
puts "Added #{tag} to manifest."
|
169
169
|
end
|
@@ -171,52 +171,52 @@ module Ruboto
|
|
171
171
|
end
|
172
172
|
end
|
173
173
|
|
174
|
-
mode
|
174
|
+
mode 'subclass' do
|
175
175
|
include Ruboto::Util::Build
|
176
176
|
|
177
|
-
argument(
|
177
|
+
argument('class'){
|
178
178
|
required
|
179
|
-
description
|
179
|
+
description 'the Android Class that you want to subclass (e.g., package.Class).'
|
180
180
|
}
|
181
181
|
|
182
|
-
option(
|
182
|
+
option('name'){
|
183
183
|
required
|
184
184
|
argument :required
|
185
|
-
description
|
185
|
+
description 'name of the class (and file). Should be CamelCase'
|
186
186
|
}
|
187
187
|
|
188
|
-
option(
|
188
|
+
option('package'){
|
189
189
|
argument :required
|
190
|
-
description
|
190
|
+
description 'package for the new class (if not specified, uses project package)'
|
191
191
|
}
|
192
192
|
|
193
|
-
option(
|
193
|
+
option('method_base'){
|
194
194
|
required
|
195
195
|
validate {|i| %w(all on none abstract).include?(i)}
|
196
196
|
argument :required
|
197
|
-
description
|
197
|
+
description 'the base set of methods to generate (adjusted with method_include and method_exclude): all, none, abstract, on (e.g., onClick)'
|
198
198
|
}
|
199
199
|
|
200
|
-
option(
|
200
|
+
option('method_include'){
|
201
201
|
argument :required
|
202
|
-
defaults
|
203
|
-
description
|
202
|
+
defaults ''
|
203
|
+
description 'additional methods to add to the base list'
|
204
204
|
}
|
205
205
|
|
206
|
-
option(
|
206
|
+
option('method_exclude'){
|
207
207
|
argument :required
|
208
|
-
defaults
|
209
|
-
description
|
208
|
+
defaults ''
|
209
|
+
description 'methods to remove from the base list'
|
210
210
|
}
|
211
211
|
|
212
|
-
option(
|
212
|
+
option('implements'){
|
213
213
|
required
|
214
214
|
argument :required
|
215
|
-
defaults
|
216
|
-
description
|
215
|
+
defaults ''
|
216
|
+
description 'comma separated list interfaces to implement'
|
217
217
|
}
|
218
218
|
|
219
|
-
option(
|
219
|
+
option('force'){
|
220
220
|
argument :required
|
221
221
|
validate {|i| %w(include exclude).include?(i)}
|
222
222
|
description "force handling of added and deprecated methods (values: 'include' or 'exclude') unless individually included or excluded"
|
@@ -229,26 +229,26 @@ module Ruboto
|
|
229
229
|
end
|
230
230
|
end
|
231
231
|
|
232
|
-
mode
|
232
|
+
mode 'interface' do
|
233
233
|
include Ruboto::Util::Build
|
234
234
|
|
235
|
-
argument(
|
235
|
+
argument('interface'){
|
236
236
|
required
|
237
|
-
description
|
237
|
+
description 'the Android Interface that you want to implement (e.g., package.Interface).'
|
238
238
|
}
|
239
239
|
|
240
|
-
option(
|
240
|
+
option('name'){
|
241
241
|
required
|
242
242
|
argument :required
|
243
|
-
description
|
243
|
+
description 'name of the class (and file) that will implement the interface. Should be CamelCase'
|
244
244
|
}
|
245
245
|
|
246
|
-
option(
|
246
|
+
option('package'){
|
247
247
|
argument :required
|
248
|
-
description
|
248
|
+
description 'package for the new class (if not specified, uses project package)'
|
249
249
|
}
|
250
250
|
|
251
|
-
option(
|
251
|
+
option('force'){
|
252
252
|
argument :required
|
253
253
|
validate {|i| %w(include exclude).include?(i)}
|
254
254
|
description "force added and deprecated interfaces (values: 'include' or 'exclude')"
|
@@ -262,45 +262,45 @@ module Ruboto
|
|
262
262
|
end
|
263
263
|
end
|
264
264
|
|
265
|
-
mode
|
265
|
+
mode 'core' do
|
266
266
|
include Ruboto::Util::Build
|
267
267
|
|
268
|
-
argument(
|
268
|
+
argument('class'){
|
269
269
|
required
|
270
270
|
validate {|i| %w(Activity Service BroadcastReceiver View PreferenceActivity TabActivity OnClickListener OnItemClickListener OnItemSelectedListener all).include?(i)}
|
271
271
|
description "Activity, Service, BroadcastReceiver, View, OnClickListener, OnItemClickListener, OnItemSelectedListener, or all (default = all); Other activities not included in 'all': PreferenceActivity, TabActivity"
|
272
272
|
}
|
273
273
|
|
274
|
-
option(
|
274
|
+
option('method_base'){
|
275
275
|
required
|
276
276
|
argument :required
|
277
277
|
validate {|i| %w(all on none).include?(i)}
|
278
|
-
defaults
|
279
|
-
description
|
278
|
+
defaults 'on'
|
279
|
+
description 'the base set of methods to generate (adjusted with method_include and method_exclude): all, none, on (e.g., onClick)'
|
280
280
|
}
|
281
281
|
|
282
|
-
option(
|
282
|
+
option('method_include'){
|
283
283
|
required
|
284
284
|
argument :required
|
285
|
-
defaults
|
286
|
-
description
|
285
|
+
defaults ''
|
286
|
+
description 'additional methods to add to the base list'
|
287
287
|
}
|
288
288
|
|
289
|
-
option(
|
289
|
+
option('method_exclude'){
|
290
290
|
required
|
291
291
|
argument :required
|
292
|
-
defaults
|
293
|
-
description
|
292
|
+
defaults ''
|
293
|
+
description 'methods to remove from the base list'
|
294
294
|
}
|
295
295
|
|
296
|
-
option(
|
296
|
+
option('implements'){
|
297
297
|
required
|
298
298
|
argument :required
|
299
|
-
defaults
|
299
|
+
defaults ''
|
300
300
|
description "for classes only, interfaces to implement (cannot be used with 'gen core all')"
|
301
301
|
}
|
302
302
|
|
303
|
-
option(
|
303
|
+
option('force'){
|
304
304
|
argument :required
|
305
305
|
validate {|i| %w(include exclude).include?(i)}
|
306
306
|
description "force handling of added and deprecated methods (values: 'include' or 'exclude') unless individually included or excluded"
|
@@ -308,31 +308,31 @@ module Ruboto
|
|
308
308
|
|
309
309
|
def run
|
310
310
|
abort("specify 'implements' only for Activity, Service, BroadcastReceiver, PreferenceActivity, or TabActivity") unless
|
311
|
-
%w(Activity Service BroadcastReceiver PreferenceActivity TabActivity).include?(params[
|
311
|
+
%w(Activity Service BroadcastReceiver PreferenceActivity TabActivity).include?(params['class'].value) or params['implements'].value == ''
|
312
312
|
generate_core_classes [:class, :method_base, :method_include, :method_exclude, :implements, :force].inject({}) {|h, i| h[i] = params[i.to_s].value; h}
|
313
313
|
end
|
314
314
|
end
|
315
315
|
end
|
316
316
|
|
317
|
-
mode
|
317
|
+
mode 'update' do
|
318
318
|
include Ruboto::Util::LogAction
|
319
319
|
include Ruboto::Util::Update
|
320
320
|
include Ruboto::Util::Verify
|
321
321
|
|
322
|
-
argument(
|
322
|
+
argument('what') {
|
323
323
|
required
|
324
324
|
# FIXME(uwe): Deprecated "ruboto update ruboto" in Ruboto 0.8.1. Remove september 2013.
|
325
325
|
validate {|i| %w(jruby app ruboto).include?(i)}
|
326
326
|
description "What do you want to update: 'app', 'jruby', or 'ruboto'"
|
327
327
|
}
|
328
328
|
|
329
|
-
option(
|
329
|
+
option('force') {
|
330
330
|
description "force an update even if the version hasn't changed"
|
331
331
|
}
|
332
332
|
|
333
333
|
def run
|
334
334
|
case params['what'].value
|
335
|
-
when
|
335
|
+
when 'app' then
|
336
336
|
force = params['force'].value
|
337
337
|
old_version = read_ruboto_version
|
338
338
|
if old_version && Gem::Version.new(old_version) < Gem::Version.new(Ruboto::UPDATE_VERSION_LIMIT)
|
@@ -355,18 +355,18 @@ module Ruboto
|
|
355
355
|
update_icons force
|
356
356
|
update_core_classes 'include'
|
357
357
|
update_bundle
|
358
|
-
when
|
358
|
+
when 'jruby' then
|
359
359
|
update_jruby(params['force'].value, true) || abort
|
360
360
|
# FIXME(uwe): Deprecated in Ruboto 0.8.1. Remove september 2013.
|
361
|
-
when
|
361
|
+
when 'ruboto' then
|
362
362
|
puts "\nThe 'ruboto update ruboto' command has been deprecated. Use\n\n ruboto update app\n\ninstead.\n\n"
|
363
363
|
update_ruboto(params['force'].value) || abort
|
364
364
|
end
|
365
365
|
end
|
366
366
|
end
|
367
367
|
|
368
|
-
option
|
369
|
-
description
|
368
|
+
option 'version' do
|
369
|
+
description 'display ruboto version'
|
370
370
|
end
|
371
371
|
|
372
372
|
# just running `ruboto`
|
data/lib/ruboto/util/update.rb
CHANGED
@@ -271,7 +271,7 @@ module Ruboto
|
|
271
271
|
|
272
272
|
def update_manifest(min_sdk, target, force = false)
|
273
273
|
log_action("\nAdding RubotoActivity, RubotoDialog, RubotoService, and SDK versions to the manifest") do
|
274
|
-
if sdk_element = verify_manifest.elements['uses-sdk']
|
274
|
+
if (sdk_element = verify_manifest.elements['uses-sdk'])
|
275
275
|
min_sdk ||= sdk_element.attributes['android:minSdkVersion']
|
276
276
|
target ||= sdk_element.attributes['android:targetSdkVersion']
|
277
277
|
else
|
@@ -362,6 +362,7 @@ module Ruboto
|
|
362
362
|
raise "Unpacking jruby-core jar failed: #$?" unless $? == 0
|
363
363
|
File.delete jruby_core
|
364
364
|
if Gem::Version.new(jruby_core_version) >= Gem::Version.new('1.7.3.dev')
|
365
|
+
#noinspection RubyLiteralArrayInspection
|
365
366
|
excluded_core_packages = [
|
366
367
|
'**/*Darwin*',
|
367
368
|
'**/*Solaris*',
|
@@ -415,129 +416,20 @@ module Ruboto
|
|
415
416
|
'org/jruby/javasupport/bsf',
|
416
417
|
# 'org/jruby/management', # should be excluded
|
417
418
|
# 'org/jruby/runtime/invokedynamic', # Should be excluded
|
419
|
+
'org/yecht',
|
418
420
|
]
|
419
421
|
elsif Gem::Version.new(jruby_core_version) >= Gem::Version.new('1.7.2')
|
420
|
-
excluded_core_packages =
|
421
|
-
'**/*Darwin*',
|
422
|
-
'**/*Ruby20*',
|
423
|
-
'**/*Solaris*',
|
424
|
-
'**/*windows*',
|
425
|
-
'**/*Windows*',
|
426
|
-
'META-INF',
|
427
|
-
'com/headius',
|
428
|
-
'com/kenai/constantine',
|
429
|
-
'com/kenai/jffi',
|
430
|
-
'com/martiansoftware',
|
431
|
-
'jline', 'jni',
|
432
|
-
'jnr/constants/platform/darwin', 'jnr/constants/platform/fake', 'jnr/constants/platform/freebsd',
|
433
|
-
'jnr/constants/platform/openbsd', 'jnr/constants/platform/sunos',
|
434
|
-
'jnr/ffi/annotations', 'jnr/ffi/byref',
|
435
|
-
'jnr/ffi/provider', 'jnr/ffi/util',
|
436
|
-
'jnr/ffi/Struct$*',
|
437
|
-
'jnr/ffi/types',
|
438
|
-
'jnr/posix/MacOS*',
|
439
|
-
'jnr/posix/OpenBSD*',
|
440
|
-
'org/apache',
|
441
|
-
'org/fusesource',
|
442
|
-
'org/jruby/ant',
|
443
|
-
'org/jruby/cext',
|
444
|
-
'org/jruby/compiler/util',
|
445
|
-
'org/jruby/demo',
|
446
|
-
'org/jruby/embed/bsf',
|
447
|
-
'org/jruby/embed/jsr223',
|
448
|
-
'org/jruby/embed/osgi',
|
449
|
-
'org/jruby/ext/ffi/io',
|
450
|
-
'org/jruby/ext/ffi/jffi',
|
451
|
-
'org/jruby/javasupport/bsf',
|
452
|
-
]
|
422
|
+
excluded_core_packages = %w(**/*Darwin* **/*Ruby20* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius com/kenai/constantine com/kenai/jffi com/martiansoftware jline jni jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/ffi/annotations jnr/ffi/byref jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/MacOS* jnr/posix/OpenBSD* org/apache org/fusesource org/jruby/ant org/jruby/cext org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/javasupport/bsf)
|
453
423
|
elsif Gem::Version.new(jruby_core_version) >= Gem::Version.new('1.7.1')
|
454
|
-
excluded_core_packages =
|
455
|
-
'**/*Darwin*',
|
456
|
-
'**/*Ruby20*',
|
457
|
-
'**/*Solaris*',
|
458
|
-
'**/*windows*',
|
459
|
-
'**/*Windows*',
|
460
|
-
'META-INF',
|
461
|
-
'com/headius',
|
462
|
-
'com/kenai/constantine', 'com/kenai/jffi', 'com/martiansoftware',
|
463
|
-
'jline', 'jni',
|
464
|
-
'jnr/constants/platform/darwin', 'jnr/constants/platform/fake', 'jnr/constants/platform/freebsd',
|
465
|
-
'jnr/constants/platform/openbsd', 'jnr/constants/platform/sunos',
|
466
|
-
'jnr/ffi/annotations', 'jnr/ffi/byref',
|
467
|
-
'jnr/ffi/provider', 'jnr/ffi/util',
|
468
|
-
'jnr/ffi/Struct$*',
|
469
|
-
'jnr/ffi/types',
|
470
|
-
'jnr/posix/MacOS*',
|
471
|
-
'jnr/posix/OpenBSD*',
|
472
|
-
'org/apache',
|
473
|
-
'org/fusesource',
|
474
|
-
'org/jruby/ant',
|
475
|
-
'org/jruby/cext',
|
476
|
-
'org/jruby/compiler/util',
|
477
|
-
'org/jruby/demo',
|
478
|
-
'org/jruby/embed/bsf',
|
479
|
-
'org/jruby/embed/jsr223',
|
480
|
-
'org/jruby/embed/osgi',
|
481
|
-
'org/jruby/ext/ffi/io',
|
482
|
-
'org/jruby/ext/ffi/jffi',
|
483
|
-
'org/jruby/ext/openssl', # TODO(uwe): Issue #154 Add back when we add jruby-openssl.
|
484
|
-
'org/jruby/javasupport/bsf',
|
485
|
-
'org/jruby/org/bouncycastle', # TODO(uwe): Issue #154 Add back when we add jruby-openssl. The bouncycastle included in Android is cripled.
|
486
|
-
]
|
424
|
+
excluded_core_packages = %w(**/*Darwin* **/*Ruby20* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius com/kenai/constantine com/kenai/jffi com/martiansoftware jline jni jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/ffi/annotations jnr/ffi/byref jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/MacOS* jnr/posix/OpenBSD* org/apache org/fusesource org/jruby/ant org/jruby/cext org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/ext/openssl org/jruby/javasupport/bsf org/jruby/org/bouncycastle)
|
487
425
|
elsif Gem::Version.new(jruby_core_version) >= Gem::Version.new('1.7.0')
|
488
426
|
# TODO(uwe): Remove when we stop supporting jruby-jars 1.7.0
|
489
|
-
excluded_core_packages =
|
490
|
-
'**/*Darwin*',
|
491
|
-
'**/*Solaris*',
|
492
|
-
'**/*windows*',
|
493
|
-
'**/*Windows*',
|
494
|
-
'META-INF',
|
495
|
-
'com/headius',
|
496
|
-
'com/kenai/constantine', 'com/kenai/jffi', 'com/martiansoftware',
|
497
|
-
'jline', 'jni',
|
498
|
-
'jnr/constants/platform/darwin', 'jnr/constants/platform/fake', 'jnr/constants/platform/freebsd',
|
499
|
-
'jnr/constants/platform/openbsd', 'jnr/constants/platform/sunos',
|
500
|
-
'jnr/ffi/annotations', 'jnr/ffi/byref',
|
501
|
-
'jnr/ffi/provider', 'jnr/ffi/util',
|
502
|
-
'jnr/ffi/Struct$*',
|
503
|
-
'jnr/ffi/types',
|
504
|
-
'jnr/posix/MacOS*',
|
505
|
-
'jnr/posix/OpenBSD*',
|
506
|
-
'org/apache',
|
507
|
-
'org/bouncycastle',
|
508
|
-
'org/fusesource',
|
509
|
-
'org/jruby/ant',
|
510
|
-
'org/jruby/cext',
|
511
|
-
'org/jruby/compiler/util',
|
512
|
-
'org/jruby/demo',
|
513
|
-
'org/jruby/embed/bsf',
|
514
|
-
'org/jruby/embed/jsr223',
|
515
|
-
'org/jruby/embed/osgi',
|
516
|
-
'org/jruby/ext/ffi/io',
|
517
|
-
'org/jruby/ext/ffi/jffi',
|
518
|
-
'org/jruby/ext/openssl',
|
519
|
-
'org/jruby/javasupport/bsf',
|
520
|
-
]
|
427
|
+
excluded_core_packages = %w(**/*Darwin* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius com/kenai/constantine com/kenai/jffi com/martiansoftware jline jni jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/ffi/annotations jnr/ffi/byref jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/MacOS* jnr/posix/OpenBSD* org/apache org/bouncycastle org/fusesource org/jruby/ant org/jruby/cext org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/ext/openssl org/jruby/javasupport/bsf)
|
521
428
|
# ODOT
|
522
429
|
elsif Gem::Version.new(jruby_core_version) >= Gem::Version.new('1.6.0')
|
523
430
|
# TODO(uwe): Remove when we stop supporting jruby-jars 1.6.x
|
524
431
|
print 'Retaining com.kenai.constantine and removing jnr for JRuby 1.6.x...'
|
525
|
-
excluded_core_packages =
|
526
|
-
'META-INF', 'cext',
|
527
|
-
'com/kenai/jffi', 'com/martiansoftware', 'ext', 'java',
|
528
|
-
'jline', 'jni',
|
529
|
-
'jnr',
|
530
|
-
'jnr/constants/platform/darwin', 'jnr/constants/platform/fake', 'jnr/constants/platform/freebsd',
|
531
|
-
'jnr/constants/platform/openbsd', 'jnr/constants/platform/sunos', 'jnr/constants/platform/windows',
|
532
|
-
'jnr/ffi/annotations', 'jnr/ffi/byref', 'jnr/ffi/provider', 'jnr/ffi/util',
|
533
|
-
'jnr/netdb', 'jnr/ffi/posix/util',
|
534
|
-
'org/apache', 'org/jruby/ant',
|
535
|
-
'org/jruby/compiler/ir',
|
536
|
-
'org/jruby/compiler/util',
|
537
|
-
'org/jruby/demo', 'org/jruby/embed/bsf',
|
538
|
-
'org/jruby/embed/jsr223', 'org/jruby/embed/osgi', 'org/jruby/ext/ffi', 'org/jruby/javasupport/bsf',
|
539
|
-
'org/jruby/runtime/invokedynamic',
|
540
|
-
]
|
432
|
+
excluded_core_packages = %w(META-INF cext com/kenai/jffi com/martiansoftware ext java jline jni jnr jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/constants/platform/windows jnr/ffi/annotations jnr/ffi/byref jnr/ffi/provider jnr/ffi/util jnr/netdb jnr/ffi/posix/util org/apache org/jruby/ant org/jruby/compiler/ir org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi org/jruby/javasupport/bsf org/jruby/runtime/invokedynamic)
|
541
433
|
# ODOT
|
542
434
|
else
|
543
435
|
raise "Unsupported JRuby version: #{jruby_core_version.inspect}."
|
@@ -757,6 +649,7 @@ module Ruboto
|
|
757
649
|
`jar -xf #{dx_jar}`
|
758
650
|
raise "Unpacking dx.jar jar failed: #$?" unless $? == 0
|
759
651
|
File.delete dx_jar
|
652
|
+
#noinspection RubyLiteralArrayInspection
|
760
653
|
excluded_core_packages = [
|
761
654
|
'com/android/dx/command',
|
762
655
|
# 'com/android/dx/ssa', # Tests run OK without this package, but we may loose some optimizations.
|
data/lib/ruboto/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
activity Java::org.ruboto.test_app.ViewConstantsActivity
|
2
|
-
java_import
|
3
|
-
java_import
|
4
|
-
java_import
|
2
|
+
java_import 'android.view.ViewGroup'
|
3
|
+
java_import 'android.view.Gravity'
|
4
|
+
java_import 'android.os.Build'
|
5
5
|
|
6
6
|
setup do |activity|
|
7
7
|
start = Time.now
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.0.rc.
|
4
|
+
version: 0.11.0.rc.1
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-04-
|
15
|
+
date: 2013-04-08 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: main
|
@@ -197,7 +197,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
197
|
version: '0'
|
198
198
|
segments:
|
199
199
|
- 0
|
200
|
-
hash: -
|
200
|
+
hash: -3322498128836612340
|
201
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
202
|
none: false
|
203
203
|
requirements:
|