ruboto 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/RELEASE_CANDICATE_DOC.md +7 -4
- data/RELEASE_DOC.md +25 -19
- data/assets/rakelib/ruboto.rake +61 -15
- data/assets/rakelib/stdlib.rake +266 -0
- data/assets/rakelib/stdlib.yml +5618 -0
- data/assets/rakelib/stdlib_dependencies.rb +136 -0
- data/assets/ruboto.yml +62 -0
- data/assets/src/org/ruboto/JRubyAdapter.java +10 -3
- data/assets/src/org/ruboto/SplashActivity.java +11 -10
- data/assets/src/ruboto/activity/reload.rb +4 -4
- data/assets/src/ruboto/widget.rb +4 -1
- data/lib/ruboto/commands/base.rb +15 -1
- data/lib/ruboto/sdk_versions.rb +10 -7
- data/lib/ruboto/util/emulator.rb +24 -27
- data/lib/ruboto/util/setup.rb +5 -0
- data/lib/ruboto/util/update.rb +9 -125
- data/lib/ruboto/util/verify.rb +1 -1
- data/lib/ruboto/version.rb +1 -1
- data/test/activity/dir_and_file_activity.rb +1 -1
- data/test/minimal_app_test.rb +7 -2
- data/test/rake_test.rb +12 -6
- data/test/ruboto_gen_test.rb +8 -2
- data/test/test_helper.rb +8 -7
- metadata +7 -3
data/lib/ruboto/util/setup.rb
CHANGED
@@ -645,6 +645,11 @@ module Ruboto
|
|
645
645
|
end
|
646
646
|
end
|
647
647
|
config_file_name = File.expand_path("~/#{a.nil? || a.empty? ? path_setup_file : a}")
|
648
|
+
unless File.exist? config_file_name
|
649
|
+
puts "Your path configuration script (#{config_file_name}) does not exist, Ruboto will create a new one."
|
650
|
+
system "touch #{config_file_name}"
|
651
|
+
end
|
652
|
+
|
648
653
|
old_config = File.read(config_file_name)
|
649
654
|
new_config = old_config.dup
|
650
655
|
new_config.gsub! /\n*# BEGIN Ruboto setup\n.*?\n# END Ruboto setup\n*/m, ''
|
data/lib/ruboto/util/update.rb
CHANGED
@@ -232,7 +232,7 @@ module Ruboto
|
|
232
232
|
def update_assets
|
233
233
|
puts "\nCopying files:"
|
234
234
|
weak_copier = Ruboto::Util::AssetCopier.new Ruboto::ASSETS, '.', false
|
235
|
-
%w{.gitignore Rakefile}.each { |f| log_action(f) { weak_copier.copy f } }
|
235
|
+
%w{.gitignore Rakefile ruboto.yml}.each { |f| log_action(f) { weak_copier.copy f } }
|
236
236
|
|
237
237
|
copier = Ruboto::Util::AssetCopier.new Ruboto::ASSETS, '.'
|
238
238
|
%w{assets rakelib res/layout test}.each do |f|
|
@@ -358,6 +358,7 @@ module Ruboto
|
|
358
358
|
def update_core_classes(force = nil)
|
359
359
|
generate_core_classes(:class => 'all', :method_base => 'on', :method_include => '', :method_exclude => '', :force => force, :implements => '')
|
360
360
|
if File.exists?('ruboto.yml')
|
361
|
+
sleep 1
|
361
362
|
FileUtils.touch 'ruboto.yml'
|
362
363
|
system 'rake jruby_adapter'
|
363
364
|
end
|
@@ -424,7 +425,9 @@ module Ruboto
|
|
424
425
|
'**/*windows*',
|
425
426
|
'**/*Windows*',
|
426
427
|
'META-INF',
|
427
|
-
'com/headius',
|
428
|
+
# 'com/headius',
|
429
|
+
'com/headius/invokebinder',
|
430
|
+
'com/headius/options/example',
|
428
431
|
'com/kenai/constantine',
|
429
432
|
'com/kenai/jffi',
|
430
433
|
'com/kenai/jnr/x86asm',
|
@@ -465,6 +468,8 @@ module Ruboto
|
|
465
468
|
'org/jruby/truffle',
|
466
469
|
'org/yecht',
|
467
470
|
]
|
471
|
+
elsif gem_version >= Gem::Version.new('1.7.12')
|
472
|
+
excluded_core_packages = %w(**/*Darwin* **/*Solaris* **/*windows* **/*Windows* META-INF com/kenai/constantine com/kenai/jffi com/kenai/jnr/x86asm com/martiansoftware 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/mapper jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/Aix* jnr/posix/FreeBSD* jnr/posix/MacOS* jnr/posix/OpenBSD* jnr/x86asm org/jruby/ant org/jruby/cext org/jruby/compiler/impl/BaseBodyCompiler* org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/AbstractMemory* org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/ext/tracepoint org/jruby/javasupport/bsf org/yecht)
|
468
473
|
elsif gem_version >= Gem::Version.new('1.7.5')
|
469
474
|
excluded_core_packages = %w(**/*Darwin* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius com/kenai/constantine com/kenai/jffi com/kenai/jnr/x86asm com/martiansoftware 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/mapper jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/Aix* jnr/posix/FreeBSD* jnr/posix/MacOS* jnr/posix/OpenBSD* jnr/x86asm org/jruby/ant org/jruby/cext org/jruby/compiler/impl/BaseBodyCompiler* org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/AbstractMemory* org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/ext/tracepoint org/jruby/javasupport/bsf org/yecht)
|
470
475
|
elsif gem_version >= Gem::Version.new('1.7.4')
|
@@ -541,129 +546,8 @@ module Ruboto
|
|
541
546
|
|
542
547
|
# - Moves ruby stdlib to the root of the jruby-stdlib jar
|
543
548
|
def reconfigure_jruby_stdlib
|
544
|
-
|
545
|
-
|
546
|
-
excluded_stdlibs = [*verify_ruboto_config['excluded_stdlibs']].compact
|
547
|
-
Dir.chdir 'libs' do
|
548
|
-
jruby_stdlib = Dir['jruby-stdlib-*.jar'][-1]
|
549
|
-
log_action("Reformatting #{jruby_stdlib}") do
|
550
|
-
FileUtils.mkdir_p 'tmp'
|
551
|
-
Dir.chdir 'tmp' do
|
552
|
-
FileUtils.mkdir_p 'old'
|
553
|
-
FileUtils.mkdir_p 'new/jruby.home'
|
554
|
-
Dir.chdir 'old' do
|
555
|
-
`jar -xf ../../#{jruby_stdlib}`
|
556
|
-
raise "Unpacking jruby-stdlib jar failed: #$?" unless $? == 0
|
557
|
-
end
|
558
|
-
FileUtils.move 'old/META-INF/jruby.home/lib', 'new/jruby.home/lib'
|
559
|
-
FileUtils.rm_rf 'new/jruby.home/lib/ruby/gems'
|
560
|
-
|
561
|
-
Dir.chdir 'new/jruby.home/lib/ruby' do
|
562
|
-
ruby_stdlib_versions = Dir['*'] - %w(gems)
|
563
|
-
if included_stdlibs
|
564
|
-
print 'excluded...'
|
565
|
-
ruby_stdlib_versions.each do |ld|
|
566
|
-
Dir.chdir ld do
|
567
|
-
libs = Dir['*'].map { |d| d.sub /\.(rb|jar)$/, '' }.uniq
|
568
|
-
libs.each do |d|
|
569
|
-
next if included_stdlibs.include? d
|
570
|
-
FileUtils.rm_rf d if File.exists? d
|
571
|
-
file = "#{d}.rb"
|
572
|
-
FileUtils.rm_rf file if File.exists? file
|
573
|
-
jarfile = "#{d}.jar"
|
574
|
-
FileUtils.rm_rf jarfile if File.exists? jarfile
|
575
|
-
print "#{d}..."
|
576
|
-
end
|
577
|
-
end
|
578
|
-
end
|
579
|
-
end
|
580
|
-
|
581
|
-
if excluded_stdlibs.any?
|
582
|
-
ruby_stdlib_versions.each do |ld|
|
583
|
-
excluded_stdlibs.each do |d|
|
584
|
-
dir = "#{ld}/#{d}"
|
585
|
-
FileUtils.rm_rf dir if File.exists? dir
|
586
|
-
file = "#{dir}.rb"
|
587
|
-
FileUtils.rm_rf file if File.exists? file
|
588
|
-
end
|
589
|
-
end
|
590
|
-
print "excluded #{excluded_stdlibs.join(' ')}..."
|
591
|
-
end
|
592
|
-
end
|
593
|
-
|
594
|
-
Dir.chdir 'new' do
|
595
|
-
Dir['**/*.jar'].each do |j|
|
596
|
-
|
597
|
-
# FIXME(uwe): Installing bcmail-jdk15-146.jar + bcprov-jdk15-146.jar fails due to
|
598
|
-
# http://code.google.com/p/android/issues/detail?id=40409
|
599
|
-
# This breaks ssl and https. Remove when we stop supporting JRuby <= 1.7.2
|
600
|
-
if j =~ /bcmail|bcprov-jdk15-146/
|
601
|
-
FileUtils.rm j
|
602
|
-
next
|
603
|
-
end
|
604
|
-
# EMXIF
|
605
|
-
|
606
|
-
# FIXME(uwe): Adding the jars triggers the "LinearAlloc exceeded capacity"
|
607
|
-
# bug in Android 2.3. Remove when we stop supporting android-10 and older
|
608
|
-
if min_sdk_version <= 10
|
609
|
-
FileUtils.rm j
|
610
|
-
next
|
611
|
-
end
|
612
|
-
# EMXIF
|
613
|
-
|
614
|
-
# FIXME(uwe): These should be included but break the 64K method count limit
|
615
|
-
if j =~ /bcpkix-jdk15on-1\.?47|bcprov-jdk15on-1\.?47|jopenssl|kryptcore|kryptproviderjdk/
|
616
|
-
FileUtils.rm j
|
617
|
-
next
|
618
|
-
end
|
619
|
-
# EMXIF
|
620
|
-
|
621
|
-
print "#{File.basename(j).chomp('.jar')}..."
|
622
|
-
system "jar xf #{j}"
|
623
|
-
FileUtils.rm j
|
624
|
-
if ENV['STRIP_INVOKERS']
|
625
|
-
invokers = Dir['**/*$INVOKER$*.class']
|
626
|
-
if invokers.size > 0
|
627
|
-
print "Removing invokers(#{invokers.size})..."
|
628
|
-
FileUtils.rm invokers
|
629
|
-
end
|
630
|
-
populators = Dir['**/*$POPULATOR.class']
|
631
|
-
if populators.size > 0
|
632
|
-
print "Removing populators(#{populators.size})..."
|
633
|
-
FileUtils.rm populators
|
634
|
-
end
|
635
|
-
end
|
636
|
-
|
637
|
-
if j =~ %r{json/ext/generator.jar$}
|
638
|
-
jar_load_code = <<-END_CODE
|
639
|
-
require 'jruby'
|
640
|
-
puts 'Starting JSON Generator Service'
|
641
|
-
public
|
642
|
-
Java::json.ext.GeneratorService.new.basicLoad(JRuby.runtime)
|
643
|
-
END_CODE
|
644
|
-
elsif j =~ %r{json/ext/parser.jar$}
|
645
|
-
jar_load_code = <<-END_CODE
|
646
|
-
require 'jruby'
|
647
|
-
puts 'Starting JSON Parser Service'
|
648
|
-
public
|
649
|
-
Java::json.ext.ParserService.new.basicLoad(JRuby.runtime)
|
650
|
-
END_CODE
|
651
|
-
else
|
652
|
-
jar_load_code = ''
|
653
|
-
end
|
654
|
-
|
655
|
-
File.open("#{j}.rb", 'w') { |f| f << jar_load_code }
|
656
|
-
File.open("#{j}.jar.rb", 'w') { |f| f << jar_load_code }
|
657
|
-
end
|
658
|
-
|
659
|
-
`jar -cf ../../#{jruby_stdlib} .`
|
660
|
-
raise "Creating repackaged jruby-stdlib jar failed: #$?" unless $? == 0
|
661
|
-
end
|
662
|
-
end
|
663
|
-
end
|
664
|
-
|
665
|
-
FileUtils.remove_dir 'tmp', true
|
666
|
-
end
|
549
|
+
abort "cannot find rakelib/stdlib.rake; make sure you update your app (ruboto update app)" unless File.exists?("rakelib/stdlib.rake")
|
550
|
+
system 'rake libs:reconfigure_stdlib'
|
667
551
|
end
|
668
552
|
|
669
553
|
# - Removes unneeded code from dx.jar
|
data/lib/ruboto/util/verify.rb
CHANGED
data/lib/ruboto/version.rb
CHANGED
@@ -11,7 +11,7 @@ class DirAndFileActivity
|
|
11
11
|
linear_layout :orientation => :vertical do
|
12
12
|
text_view :id => 42, :text => __FILE__
|
13
13
|
text_view :id => 43, :text => File.dirname(__FILE__)
|
14
|
-
text_view :id => 44, :text => Dir["#{File.dirname(__FILE__)}/*"][0].to_s
|
14
|
+
text_view :id => 44, :text => Dir["#{File.dirname(__FILE__)}/*"].sort[0].to_s
|
15
15
|
text_view :id => 45, :text => Dir.foreach(File.dirname(__FILE__)).to_a[2].to_s
|
16
16
|
end
|
17
17
|
end
|
data/test/minimal_app_test.rb
CHANGED
@@ -19,15 +19,20 @@ if RubotoTest::RUBOTO_PLATFORM == 'STANDALONE'
|
|
19
19
|
# APK was 4.3MB. JRuby: 1.7.5, ANDROID_TARGET: 16
|
20
20
|
# APK was 8.4MB. JRuby: 1.7.8, ANDROID_TARGET: 10
|
21
21
|
# APK was 4.3MB. JRuby: 1.7.8, ANDROID_TARGET: 16
|
22
|
+
# APK was 4.4MB. JRuby: 1.7.12, ANDROID_TARGET: 19
|
22
23
|
# APK was 4.2MB. JRuby: 9000.dev, ANDROID_TARGET: 10
|
23
24
|
# APK was 4.2MB. JRuby: 9000.dev, ANDROID_TARGET: 15
|
24
|
-
# APK was 4.
|
25
|
+
# APK was 4.5MB. JRuby: 9000.dev, ANDROID_TARGET: 16
|
25
26
|
def test_minimal_apk_is_within_limits
|
26
27
|
apk_size = BigDecimal(File.size("#{APP_DIR}/bin/RubotoTestApp-debug.apk").to_s) / (1024 * 1024)
|
27
28
|
upper_limit = {
|
28
29
|
'1.7.4' => 4.4,
|
29
30
|
'1.7.8' => 4.3,
|
30
|
-
'
|
31
|
+
'1.7.9' => 4.3,
|
32
|
+
'1.7.10' => 4.4,
|
33
|
+
'1.7.11' => 4.4,
|
34
|
+
'1.7.12' => 4.4,
|
35
|
+
'9000.dev' => 4.5,
|
31
36
|
}[JRUBY_JARS_VERSION.to_s] || 4.3
|
32
37
|
lower_limit = upper_limit * 0.9
|
33
38
|
version_message ="JRuby: #{JRUBY_JARS_VERSION}, ANDROID_TARGET: #{ANDROID_TARGET}"
|
data/test/rake_test.rb
CHANGED
@@ -21,34 +21,40 @@ class RakeTest < Test::Unit::TestCase
|
|
21
21
|
s2.gsub!(/What hath Matz wrought\?/, 'This text was changed by script!')
|
22
22
|
File.open(test_filename, 'w') { |f| f << s2 }
|
23
23
|
|
24
|
-
apk_timestamp = File.
|
24
|
+
apk_timestamp = File.mtime("bin/#{APP_NAME}-debug.apk")
|
25
25
|
end
|
26
26
|
run_app_tests
|
27
27
|
|
28
28
|
# FIXME(uwe): Uncomment this when we can build the test package without building the main package
|
29
|
-
# assert_equal apk_timestamp, File.
|
29
|
+
# assert_equal apk_timestamp, File.mtime("bin/#{APP_NAME}-debug.apk"), 'APK should not have been rebuilt'
|
30
30
|
# EMXIF
|
31
31
|
|
32
32
|
assert_match %r{^/sdcard/Android/data/#{PACKAGE}/files/scripts$}, `adb shell ls -d /sdcard/Android/data/#{PACKAGE}/files/scripts`.chomp
|
33
33
|
end
|
34
34
|
|
35
|
+
# FIXME(uwe): This is actually a case where we want to just update the Ruby
|
36
|
+
# source file instead of rebuilding the apk.
|
35
37
|
def test_that_apk_is_built_if_only_one_ruby_source_file_has_changed
|
36
38
|
Dir.chdir APP_DIR do
|
37
39
|
system 'rake debug'
|
38
|
-
apk_timestamp = File.
|
40
|
+
apk_timestamp = File.mtime("bin/#{APP_NAME}-debug.apk")
|
41
|
+
sleep 1
|
39
42
|
FileUtils.touch 'src/ruboto_test_app_activity.rb'
|
43
|
+
sleep 1
|
40
44
|
system 'rake debug'
|
41
|
-
assert_not_equal apk_timestamp, File.
|
45
|
+
assert_not_equal apk_timestamp, File.mtime("bin/#{APP_NAME}-debug.apk"),
|
46
|
+
'APK should have been rebuilt'
|
42
47
|
end
|
43
48
|
end
|
44
49
|
|
45
50
|
def test_that_apk_is_built_if_only_one_non_ruby_source_file_has_changed
|
46
51
|
Dir.chdir APP_DIR do
|
47
52
|
system 'rake debug'
|
48
|
-
apk_timestamp = File.
|
53
|
+
apk_timestamp = File.mtime("bin/#{APP_NAME}-debug.apk")
|
49
54
|
FileUtils.touch 'src/not_ruby_source.properties'
|
50
55
|
system 'rake debug'
|
51
|
-
assert_not_equal apk_timestamp, File.
|
56
|
+
assert_not_equal apk_timestamp, File.mtime("bin/#{APP_NAME}-debug.apk"),
|
57
|
+
'APK should have been rebuilt'
|
52
58
|
end
|
53
59
|
end
|
54
60
|
|
data/test/ruboto_gen_test.rb
CHANGED
@@ -62,8 +62,12 @@ class RubotoGenTest < Test::Unit::TestCase
|
|
62
62
|
# APK was 8781.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.8
|
63
63
|
# APK was 8789.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.9
|
64
64
|
# APK was 8791.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.10
|
65
|
+
# APK was 8575.0KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 1.7.11
|
66
|
+
# APK was 8793.4KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.11
|
67
|
+
# APK was 8820.3KB. PLATFORM: STANDALONE, ANDROID_TARGET: 19, JRuby: 1.7.12
|
65
68
|
# APK was 6689.5KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 9000.dev
|
66
69
|
# APK was 7012.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 9000.dev
|
70
|
+
# APK was 7201.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 17, JRuby: 9000.dev
|
67
71
|
def test_new_apk_size_is_within_limits
|
68
72
|
apk_size = BigDecimal(File.size("#{APP_DIR}/bin/RubotoTestApp-debug.apk").to_s) / 1024
|
69
73
|
version = " PLATFORM: #{RUBOTO_PLATFORM}"
|
@@ -76,7 +80,9 @@ class RubotoGenTest < Test::Unit::TestCase
|
|
76
80
|
'1.7.8' => 8800.0,
|
77
81
|
'1.7.9' => 8800.0,
|
78
82
|
'1.7.10' => 8800.0,
|
79
|
-
'
|
83
|
+
'1.7.11' => 8800.0,
|
84
|
+
'1.7.12' => 8900.0,
|
85
|
+
'9000.dev' => 7300.0,
|
80
86
|
}[JRUBY_JARS_VERSION.to_s] || 0.0
|
81
87
|
version << ", JRuby: #{JRUBY_JARS_VERSION.to_s}"
|
82
88
|
else
|
@@ -86,7 +92,7 @@ class RubotoGenTest < Test::Unit::TestCase
|
|
86
92
|
16 => 75.0,
|
87
93
|
}[ANDROID_TARGET] || 75.0
|
88
94
|
end
|
89
|
-
lower_limit = upper_limit * 0.
|
95
|
+
lower_limit = upper_limit * 0.7
|
90
96
|
assert apk_size <= upper_limit, "APK was larger than #{'%.1f' % upper_limit}KB: #{'%.1f' % apk_size.ceil(1)}KB.#{version}"
|
91
97
|
assert apk_size >= lower_limit, "APK was smaller than #{'%.1f' % lower_limit}KB: #{'%.1f' % apk_size.floor(1)}KB. You should lower the limit.#{version}"
|
92
98
|
end
|
data/test/test_helper.rb
CHANGED
@@ -46,7 +46,7 @@ module RubotoTest
|
|
46
46
|
version = $1
|
47
47
|
api_level = VERSION_TO_API_LEVEL[version]
|
48
48
|
raise "Unknown version: #{version}" if api_level.nil?
|
49
|
-
return api_level
|
49
|
+
return "android-#{api_level}"
|
50
50
|
end
|
51
51
|
if line =~ /\[ro\.build\.version\.sdk\]: \[(\d+)\]/
|
52
52
|
return $1
|
@@ -159,6 +159,7 @@ class Test::Unit::TestCase
|
|
159
159
|
package = options.delete(:package) || PACKAGE
|
160
160
|
standalone = options.delete(:standalone) || !!included_stdlibs || !!excluded_stdlibs || ENV['RUBOTO_PLATFORM'] == 'STANDALONE'
|
161
161
|
update = options.delete(:update) || false
|
162
|
+
ruby_version = options.delete(:ruby_version) || (JRUBY_JARS_VERSION.to_s[0..0] == "9" ? 2.1 : 1.9)
|
162
163
|
raise "Unknown options: #{options.inspect}" unless options.empty?
|
163
164
|
|
164
165
|
raise 'Inclusion/exclusion of libs requires standalone mode.' if (included_stdlibs || excluded_stdlibs) && !standalone
|
@@ -169,6 +170,7 @@ class Test::Unit::TestCase
|
|
169
170
|
template_dir = "#{APP_DIR}_template_#{$$}"
|
170
171
|
template_dir << "_package_#{package}" if package != PACKAGE
|
171
172
|
template_dir << "_heap_alloc_#{heap_alloc}" if heap_alloc
|
173
|
+
# template_dir << "_ruby_version_#{ruby_version.to_s.gsub('.', '_')}" if ruby_version
|
172
174
|
template_dir << "_example_#{example}" if example
|
173
175
|
template_dir << "_bundle_#{[*bundle].join('_')}" if bundle
|
174
176
|
template_dir << '_updated' if update
|
@@ -187,7 +189,7 @@ class Test::Unit::TestCase
|
|
187
189
|
File.open('local.properties', 'w') { |f| f.puts "sdk.dir=#{ANDROID_HOME}" }
|
188
190
|
File.open('test/local.properties', 'w') { |f| f.puts "sdk.dir=#{ANDROID_HOME}" }
|
189
191
|
if standalone
|
190
|
-
write_ruboto_yml(included_stdlibs, excluded_stdlibs, heap_alloc) if included_stdlibs || excluded_stdlibs || heap_alloc
|
192
|
+
write_ruboto_yml(included_stdlibs, excluded_stdlibs, heap_alloc, ruby_version) if included_stdlibs || excluded_stdlibs || heap_alloc || ruby_version
|
191
193
|
FileUtils.touch 'libs/jruby-core-x.x.x.jar'
|
192
194
|
FileUtils.touch 'libs/jruby-stdlib-x.x.x.jar'
|
193
195
|
install_jruby_jars_gem
|
@@ -209,7 +211,7 @@ class Test::Unit::TestCase
|
|
209
211
|
end
|
210
212
|
Dir.chdir APP_DIR do
|
211
213
|
write_gemfile(bundle) if bundle
|
212
|
-
write_ruboto_yml(included_stdlibs, excluded_stdlibs, heap_alloc) if included_stdlibs || excluded_stdlibs || heap_alloc
|
214
|
+
write_ruboto_yml(included_stdlibs, excluded_stdlibs, heap_alloc, ruby_version) if included_stdlibs || excluded_stdlibs || heap_alloc || ruby_version
|
213
215
|
if standalone
|
214
216
|
system "#{RUBOTO_CMD} gen jruby"
|
215
217
|
raise "update jruby failed with return code #$?" if $? != 0
|
@@ -287,14 +289,13 @@ class Test::Unit::TestCase
|
|
287
289
|
end
|
288
290
|
end
|
289
291
|
|
290
|
-
def write_ruboto_yml(included_stdlibs, excluded_stdlibs, heap_alloc)
|
292
|
+
def write_ruboto_yml(included_stdlibs, excluded_stdlibs, heap_alloc, ruby_version)
|
291
293
|
yml = YAML.dump({'included_stdlibs' => included_stdlibs,
|
292
294
|
'excluded_stdlibs' => excluded_stdlibs,
|
295
|
+
# 'ruby_version' => ruby_version,
|
293
296
|
'heap_alloc' => heap_alloc})
|
294
297
|
puts "Adding ruboto.yml:\n#{yml}"
|
295
|
-
File.open('ruboto.yml', 'w')
|
296
|
-
f << yml
|
297
|
-
end
|
298
|
+
File.open('ruboto.yml', 'w') { |f| f << yml }
|
298
299
|
end
|
299
300
|
|
300
301
|
def write_gemfile(bundle)
|
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: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Jackoway
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-
|
14
|
+
date: 2014-04-17 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: main
|
@@ -78,6 +78,9 @@ files:
|
|
78
78
|
- assets/Rakefile
|
79
79
|
- assets/libs/dx.jar
|
80
80
|
- assets/rakelib/ruboto.rake
|
81
|
+
- assets/rakelib/stdlib.rake
|
82
|
+
- assets/rakelib/stdlib.yml
|
83
|
+
- assets/rakelib/stdlib_dependencies.rb
|
81
84
|
- assets/res/.DS_Store
|
82
85
|
- assets/res/drawable-hdpi/.DS_Store
|
83
86
|
- assets/res/drawable-hdpi/ic_launcher.png
|
@@ -86,6 +89,7 @@ files:
|
|
86
89
|
- assets/res/drawable/.DS_Store
|
87
90
|
- assets/res/drawable/get_ruboto_core.png
|
88
91
|
- assets/res/layout/get_ruboto_core.xml
|
92
|
+
- assets/ruboto.yml
|
89
93
|
- assets/samples/sample_activity.rb
|
90
94
|
- assets/samples/sample_activity_test.rb
|
91
95
|
- assets/samples/sample_broadcast_receiver.rb
|
@@ -228,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
228
232
|
version: '0'
|
229
233
|
requirements: []
|
230
234
|
rubyforge_project: ruboto/ruboto
|
231
|
-
rubygems_version: 2.2.
|
235
|
+
rubygems_version: 2.2.2
|
232
236
|
signing_key:
|
233
237
|
specification_version: 4
|
234
238
|
summary: A platform for developing apps using JRuby on Android.
|