ruboto 1.4.0 → 1.4.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +3 -6
- data/RELEASE_CANDICATE_DOC.md +3 -8
- data/RELEASE_DOC.md +23 -57
- data/Rakefile +15 -17
- data/assets/.gitignore +1 -0
- data/assets/rakelib/ruboto.rake +10 -7
- data/lib/ruboto/commands/base.rb +13 -3
- data/lib/ruboto/util/emulator.rb +6 -4
- data/lib/ruboto/util/setup.rb +53 -22
- data/lib/ruboto/util/update.rb +15 -22
- data/lib/ruboto/version.rb +1 -1
- data/test/app_test_methods.rb +3 -11
- data/test/minimal_app_test.rb +5 -3
- data/test/ruboto_gen_test.rb +34 -40
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4c5388b2c49b07f2a24e6ff47ddbfc1bdf3d3c32
|
|
4
|
+
data.tar.gz: 5e403bbd0d6595fcfa3a331219ab11c78f8038e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af308b2ecd2ace0e15375505db4cc4c67ef466952a64bfe761e784dcf5b3ad4a41546418cf2c1e0745a5dfb74c81f74cd36a24177bc44da3ce49429687886b23
|
|
7
|
+
data.tar.gz: e90f2a78ea73193a1bfb24ee6436921ecf6c393947d3bd4d2d17fc9fec39067da4d335dcebd5082e3f09c8aa1326aceefb4b33e7269b242b50eb9dd0f77adf06
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ruboto (1.4.
|
|
4
|
+
ruboto (1.4.1.dev)
|
|
5
5
|
main (~> 5.2)
|
|
6
6
|
rake (~> 10.0)
|
|
7
7
|
rubyzip (~> 1.0)
|
|
@@ -21,7 +21,7 @@ GEM
|
|
|
21
21
|
pry (>= 0.9)
|
|
22
22
|
map (6.5.5)
|
|
23
23
|
method_source (0.8.2)
|
|
24
|
-
minitest (5.
|
|
24
|
+
minitest (5.8.3)
|
|
25
25
|
pry (0.10.3)
|
|
26
26
|
coderay (~> 1.1.0)
|
|
27
27
|
method_source (~> 0.8.1)
|
data/README.md
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
[](http://badge.fury.io/rb/ruboto)
|
|
2
|
+
[](https://travis-ci.org/ruboto/ruboto)
|
|
3
|
+
[](https://codeclimate.com/github/ruboto/ruboto)
|
|
7
4
|
|
|
8
5
|
Ruboto (JRuby on Android) is a platform for developing full stand-alone apps for
|
|
9
6
|
Android using the Ruby language and libraries. It includes support libraries
|
data/RELEASE_CANDICATE_DOC.md
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
Subject: [ANN] Ruboto 1.4.
|
|
1
|
+
Subject: [ANN] Ruboto 1.4.1 release candidate
|
|
2
2
|
|
|
3
3
|
Hi all!
|
|
4
4
|
|
|
5
|
-
The Ruboto 1.4.
|
|
5
|
+
The Ruboto 1.4.1 release candidate is now available.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
of HAXM. `ruboto setup --update` will now update an existing HAXM
|
|
9
|
-
installation if a new version is available for download.
|
|
10
|
-
|
|
11
|
-
Support for Android 2.3 has been dropped, and Android 4.1 is now the
|
|
12
|
-
default api level when creating new apps.
|
|
7
|
+
Bugfixes for the 1.4.0 release.
|
|
13
8
|
|
|
14
9
|
As always we need your help and feedback to ensure the quality of the release. Please install the release candidate using
|
|
15
10
|
|
data/RELEASE_DOC.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Subject: [ANN] Ruboto 1.4.
|
|
1
|
+
Subject: [ANN] Ruboto 1.4.1 released!
|
|
2
2
|
|
|
3
|
-
The Ruboto team is pleased to announce the release of Ruboto 1.4.
|
|
3
|
+
The Ruboto team is pleased to announce the release of Ruboto 1.4.1.
|
|
4
4
|
|
|
5
5
|
Ruboto (JRuby on Android) is a platform for developing full stand-alone
|
|
6
6
|
apps for Android using the Ruby language and libraries. It includes
|
|
@@ -8,78 +8,44 @@ support libraries and generators for creating projects, classes, tests,
|
|
|
8
8
|
and more. The complete APIs of Android, Java, and Ruby are available to
|
|
9
9
|
you using the Ruby language.
|
|
10
10
|
|
|
11
|
-
New in version 1.4.
|
|
11
|
+
New in version 1.4.1:
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
of HAXM. `ruboto setup --update` will now update an existing HAXM
|
|
15
|
-
installation if a new version is available for download.
|
|
16
|
-
|
|
17
|
-
Support for Android 2.3 has been dropped, and Android 4.1 is now the
|
|
18
|
-
default api level when creating new apps.
|
|
19
|
-
|
|
20
|
-
API Changes:
|
|
21
|
-
|
|
22
|
-
* Issue #687 Drop support for Android 2.3 api level 10
|
|
23
|
-
* Issue #688 Set Android 4.1 api level 16 as default api level for new
|
|
24
|
-
apps
|
|
25
|
-
* Issue #770 Support jruby 1.7.22 (donv)
|
|
13
|
+
Bugfixes for the 1.4.0 release.
|
|
26
14
|
|
|
27
15
|
Features:
|
|
28
16
|
|
|
29
|
-
* Issue #
|
|
30
|
-
* Issue #
|
|
31
|
-
|
|
17
|
+
* Issue #779 Differentiate the default dex heap size for 32-bit systems
|
|
18
|
+
* Issue #780 Update "rake log" to handle output from Android 6.0
|
|
19
|
+
* Issue #782 Do not commit the keystore by default
|
|
20
|
+
* Issue #789 Add support for JRuby 1.7.24
|
|
32
21
|
|
|
33
22
|
Bugfixes:
|
|
34
23
|
|
|
35
|
-
* Issue #
|
|
36
|
-
|
|
37
|
-
* Issue #
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* Issue #
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* Issue #669 Keep on restarting new emulator
|
|
44
|
-
* Issue #686 Can't run on Real device with Android 5.0
|
|
45
|
-
* Issue #703 The HAXM installer for OS X has changed name
|
|
46
|
-
* Issue #712 can´t install ruboto
|
|
47
|
-
* Issue #716 New App with no custom code terminates directly after start
|
|
48
|
-
(java.lang.NoSuchMethodException: makeDexElements).
|
|
49
|
-
* Issue #717 ruboto setup -y - FATAL -- : undefined method 'slice' for
|
|
50
|
-
nil:NilClass
|
|
51
|
-
* Issue #742 Accept Android plataform tools rc in setup
|
|
52
|
-
* Issue #747 Running the emulator often hangs when run without
|
|
53
|
-
"--no-snapshot"
|
|
54
|
-
* Issue #759 "ruboto gen jruby" should install jruby-jars ~>1.7
|
|
55
|
-
* Issue #765 'rake boing' fails for multiple updated files
|
|
24
|
+
* Issue #783 Don't report changing emulator properties when they are not
|
|
25
|
+
actually changed
|
|
26
|
+
* Issue #784 Improve haxm install with/without "-y" and "--upgrade"
|
|
27
|
+
options (donv)
|
|
28
|
+
* Issue #785 Setup never finds Platform SDK
|
|
29
|
+
* Issue #786 Use $ANDROID_HOME instead of android executable location to
|
|
30
|
+
find platforms (ahills)
|
|
31
|
+
* Issue #790 Fix "--update" option for "ruboto setup"
|
|
56
32
|
|
|
57
|
-
|
|
33
|
+
Performance:
|
|
58
34
|
|
|
59
|
-
* Issue #
|
|
60
|
-
* Issue #736 rake install error
|
|
61
|
-
* Issue #739 Game Frameworks?
|
|
62
|
-
* Issue #750 Deploy ruboto within Gnuroot debian linux under Android OS
|
|
63
|
-
* Issue #752 can't install ruboto with ruby gems in windows 10.
|
|
35
|
+
* Issue #787 Refresh the benchmark server layout and design
|
|
64
36
|
|
|
65
|
-
|
|
37
|
+
Support:
|
|
66
38
|
|
|
67
|
-
* Issue #
|
|
68
|
-
* Issue #
|
|
69
|
-
* Issue #771 How can I help? (ChaosCat)
|
|
39
|
+
* Issue #749 Invalid maximum heap size: -Xmx4096M
|
|
40
|
+
* Issue #761 JDK 7
|
|
70
41
|
|
|
71
42
|
Internal:
|
|
72
43
|
|
|
73
|
-
* Issue #
|
|
74
|
-
* Issue #767 TypeError: can't convert nil into String when running
|
|
75
|
-
Ruboto tests
|
|
76
|
-
* Issue #769 Fetch jruby-jars snapshots from http://ci.jruby.org/ for
|
|
77
|
-
testing
|
|
78
|
-
* Issue #772 Db haxm dark (daneb)
|
|
44
|
+
* Issue #773 Release 1.4.1
|
|
79
45
|
|
|
80
46
|
You can find a complete list of issues here:
|
|
81
47
|
|
|
82
|
-
* https://github.com/ruboto/ruboto/issues?state=closed&milestone=
|
|
48
|
+
* https://github.com/ruboto/ruboto/issues?state=closed&milestone=40
|
|
83
49
|
|
|
84
50
|
|
|
85
51
|
Installation:
|
data/Rakefile
CHANGED
|
@@ -506,7 +506,8 @@ task :get_jruby_jars_snapshots do
|
|
|
506
506
|
index = Net::HTTP.get(download_host, download_dir)
|
|
507
507
|
all_gems = index.scan(%r{jruby-jars-.*?.gem}).sort_by{|v| Gem::Version.new(v[11..-5])}
|
|
508
508
|
master_gem = all_gems.last
|
|
509
|
-
|
|
509
|
+
stable_gems = all_gems.grep /-1\.7\./
|
|
510
|
+
stable_gem = stable_gems.last
|
|
510
511
|
FileUtils.rm_rf Dir['jruby-jars-*.gem']
|
|
511
512
|
[[master_gem, 'master'], [stable_gem, 'jruby-1_7']].each do |gem, branch|
|
|
512
513
|
print "Downloading #{gem}: \r"
|
|
@@ -541,34 +542,31 @@ task '.travis.yml' do
|
|
|
541
542
|
allow_failures = ''
|
|
542
543
|
|
|
543
544
|
# FIXME(uwe): JRuby 1.7.13 works for Nettbuss. Keep for 2016.
|
|
544
|
-
# FIXME(uwe): JRuby 1.7.19: RSS? => RubotoGenTest#test_activity_tests => Native crash
|
|
545
|
-
# FIXME(uwe): JRuby 1.7.22: OK except https://github.com/jruby/jruby/issues/3401
|
|
546
|
-
# FIXME(uwe): RubotoCore (CURRENT) is missing thread_safe
|
|
547
545
|
# FIXME(uwe): Test all of these that work
|
|
548
546
|
[
|
|
549
547
|
['CURRENT', [nil]],
|
|
550
548
|
['FROM_GEM', [:MASTER, :STABLE]],
|
|
551
|
-
['STANDALONE', [:MASTER, :STABLE, '1.7.
|
|
549
|
+
['STANDALONE', [:MASTER, :STABLE, '1.7.24', '1.7.13']],
|
|
552
550
|
].each do |platform, versions|
|
|
553
551
|
versions.each do |v|
|
|
554
552
|
# FIXME(uwe): Test the newest and most common api levels
|
|
555
|
-
# FIXME(uwe): Nettbuss uses api level 15.
|
|
553
|
+
# FIXME(uwe): Nettbuss uses api level 15. Keep for 2016.
|
|
556
554
|
# FIXME(uwe): https://github.com/ruboto/ruboto/issues/426
|
|
557
555
|
[23, 22, 21, 19, 17, 16, 15].each do |api|
|
|
558
556
|
(1..test_parts).each do |n|
|
|
559
557
|
line = " - ANDROID_TARGET=#{api} RUBOTO_PLATFORM=#{platform.ljust(10)} TEST_PART=#{n}of#{test_parts}#{" JRUBY_JARS_VERSION=#{v}" if v}\n"
|
|
560
|
-
|
|
561
|
-
|
|
558
|
+
|
|
559
|
+
next if v == :MASTER # FIXME(uwe): Remove when master branch is green.
|
|
560
|
+
next if api == 23 # FIXME(uwe): Remove when Android 6.0 is green. Unable to start emulator on travis.
|
|
561
|
+
next if api == 22 # FIXME(uwe): Remove when Android 5.1 is green. Must use slow ARM emulator due to missing HAXM.
|
|
562
|
+
next if api == 22 && platform == 'STANDALONE' && v == :STABLE # FIXME(uwe): Remove when Android 5.1 is green. Must use slow ARM emulator due to missing HAXM.
|
|
563
|
+
next if api == 21 # FIXME(uwe): Remove when Android 5.0 is green.
|
|
564
|
+
next if api == 17 # FIXME(uwe): Remove when Android 4.2 is green.
|
|
565
|
+
next if api == 16 # FIXME(uwe): Remove when Android 4.1 is green.
|
|
566
|
+
|
|
567
|
+
if platform == 'FROM_GEM' || # FIXME(uwe): Remove when new RubotoCore is green.
|
|
568
|
+
(v == :STABLE && (platform != 'STANDALONE' || api != 15)) || # FIXME(uwe): Remove when 1.7 branch is green.
|
|
562
569
|
v == '1.7.13' || # FIXME(uwe): Remove when 1.7.13 is green.
|
|
563
|
-
api == 23 || # FIXME(uwe): Remove when Android 6.0 is green. Unable to start emulator on travis.
|
|
564
|
-
api == 22 || # FIXME(uwe): Remove when Android 5.1 is green. Must use slow ARM emulator due to missing HAXM.
|
|
565
|
-
api == 21 || # FIXME(uwe): Remove when Android 5.0 is green.
|
|
566
|
-
api == 17 || # FIXME(uwe): Remove when Android 4.2 is green.
|
|
567
|
-
api == 16 || # FIXME(uwe): Remove when Android 4.1 is green.
|
|
568
|
-
false
|
|
569
|
-
next
|
|
570
|
-
elsif platform == 'FROM_GEM' || # FIXME(uwe): Remove when new RubotoCore is green.
|
|
571
|
-
(v == '1.7.22' && api != 15) || # FIXME(uwe): Remove when jruby-jars 1.7.22 is green.
|
|
572
570
|
false
|
|
573
571
|
allow_failures << line.gsub('-', '- env:')
|
|
574
572
|
end
|
data/assets/.gitignore
CHANGED
data/assets/rakelib/ruboto.rake
CHANGED
|
@@ -555,7 +555,10 @@ file APK_FILE => APK_DEPENDENCIES do |t|
|
|
|
555
555
|
build_apk(t, false)
|
|
556
556
|
end
|
|
557
557
|
|
|
558
|
-
|
|
558
|
+
# FIXME(uwe): Simplify when we stop supporting 32-bit development environments
|
|
559
|
+
DEFAULT_MIN_DX_HEAP_SIZE = RbConfig::CONFIG['host_cpu'] =~ /86/ ? 3072 : 4096
|
|
560
|
+
# EMXIF
|
|
561
|
+
MINIMUM_DX_HEAP_SIZE = (ENV['DX_HEAP_SIZE'] && ENV['DX_HEAP_SIZE'].to_i) || DEFAULT_MIN_DX_HEAP_SIZE
|
|
559
562
|
task :patch_dex do
|
|
560
563
|
DX_FILENAMES.each do |dx_filename|
|
|
561
564
|
new_dx_content = File.read(dx_filename).dup
|
|
@@ -892,21 +895,21 @@ task :log, [:filter] do |t, args|
|
|
|
892
895
|
IO.popen logcat_cmd do |logcat|
|
|
893
896
|
puts "--- waiting for activity #{package}/.#{main_activity} ..."
|
|
894
897
|
activity_started = false
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
restarted_regex =
|
|
898
|
-
related_regex =
|
|
898
|
+
started_regex = %r"I.ActivityManager.+Start proc #{package} for activity #{package}/\.#{main_activity}: pid=(?<pid>\d+)"
|
|
899
|
+
started_regex_android_5_1 = %r"I.ActivityManager.+Start proc (?<pid>\d+):#{package}/.+ for activity #{package}/\.#{main_activity}"
|
|
900
|
+
restarted_regex = %r"I.ActivityManager.+START u0 {cmp=#{package}/org.ruboto.RubotoActivity.+} from pid (?<pid>\d+)"
|
|
901
|
+
related_regex = /#{package}|#{main_activity}/
|
|
899
902
|
android_4_2_noise_regex = /Unexpected value from nativeGetEnabledTags/
|
|
900
903
|
pid_regex = nil
|
|
901
904
|
logcat.each_line do |line|
|
|
902
905
|
line.force_encoding(Encoding::BINARY)
|
|
903
|
-
# FIXME(uwe): Remove when we stop supporting
|
|
906
|
+
# FIXME(uwe): Remove when we stop supporting Android 4.2
|
|
904
907
|
next if line =~ android_4_2_noise_regex
|
|
905
908
|
# EMXIF
|
|
906
909
|
if (activity_start_match = started_regex.match(line) || started_regex_android_5_1.match(line) || restarted_regex.match(line))
|
|
907
910
|
activity_started = true
|
|
908
911
|
pid = activity_start_match[:pid]
|
|
909
|
-
pid_regex =
|
|
912
|
+
pid_regex = /\( *#{pid}\): /
|
|
910
913
|
puts "--- activity PID=#{pid}"
|
|
911
914
|
end
|
|
912
915
|
if activity_started && (line =~ pid_regex || line =~ related_regex)
|
data/lib/ruboto/commands/base.rb
CHANGED
|
@@ -449,12 +449,22 @@ module Ruboto
|
|
|
449
449
|
description 'answer "yes" to all interactive questions. Will automatically install needed components.'
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
option('
|
|
453
|
-
description '
|
|
452
|
+
option('update', 'u') {
|
|
453
|
+
description 'updates intel haxm'
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
option('upgrade') {
|
|
457
|
+
description 'DEPRECATED: Use --update instead'
|
|
454
458
|
}
|
|
455
459
|
|
|
456
460
|
def run
|
|
457
|
-
|
|
461
|
+
update = params['update'].value
|
|
462
|
+
|
|
463
|
+
# FIXME(uwe): Remove after Ruboto 1.5.0 is released
|
|
464
|
+
update ||= params['upgrade'].value
|
|
465
|
+
# EMXIF
|
|
466
|
+
|
|
467
|
+
setup_ruboto(params['yes'].value, params['target'].values, update)
|
|
458
468
|
end
|
|
459
469
|
end
|
|
460
470
|
|
data/lib/ruboto/util/emulator.rb
CHANGED
|
@@ -48,7 +48,7 @@ module Ruboto
|
|
|
48
48
|
end
|
|
49
49
|
else
|
|
50
50
|
puts "Unexpected response from emulator: #{output.inspect}"
|
|
51
|
-
puts
|
|
51
|
+
puts 'Assuming wrong emulator is running.'
|
|
52
52
|
end
|
|
53
53
|
else
|
|
54
54
|
puts 'No emulator is running.'
|
|
@@ -269,11 +269,13 @@ EOF
|
|
|
269
269
|
end
|
|
270
270
|
|
|
271
271
|
def add_property(new_avd_config, property_name, value)
|
|
272
|
-
pattern = /^#{property_name}
|
|
272
|
+
pattern = /^#{property_name}=(.*)$/
|
|
273
273
|
property = "#{property_name}=#{value}"
|
|
274
274
|
if new_avd_config =~ pattern
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
if $1 != value
|
|
276
|
+
new_avd_config.gsub! pattern, property
|
|
277
|
+
puts "Changed property: #{property}"
|
|
278
|
+
end
|
|
277
279
|
else
|
|
278
280
|
new_avd_config << "#{property}\n"
|
|
279
281
|
puts "Added property: #{property}"
|
data/lib/ruboto/util/setup.rb
CHANGED
|
@@ -21,7 +21,7 @@ module Ruboto
|
|
|
21
21
|
def setup_ruboto(accept_all, api_levels = [SdkVersions::DEFAULT_TARGET_SDK], upgrade_haxm = false)
|
|
22
22
|
@platform_sdk_loc = {}
|
|
23
23
|
api_levels = [project_api_level, *api_levels].compact.uniq
|
|
24
|
-
install_all(accept_all, api_levels, upgrade_haxm) unless check_all(api_levels)
|
|
24
|
+
install_all(accept_all, api_levels, upgrade_haxm) unless check_all(api_levels, upgrade_haxm)
|
|
25
25
|
config_path(accept_all)
|
|
26
26
|
end
|
|
27
27
|
|
|
@@ -161,7 +161,7 @@ module Ruboto
|
|
|
161
161
|
# Check Methods
|
|
162
162
|
#
|
|
163
163
|
|
|
164
|
-
def check_all(api_levels)
|
|
164
|
+
def check_all(api_levels, update = false)
|
|
165
165
|
@existing_paths ||= []
|
|
166
166
|
@missing_paths ||= []
|
|
167
167
|
|
|
@@ -179,11 +179,20 @@ module Ruboto
|
|
|
179
179
|
@missing_paths.uniq!
|
|
180
180
|
|
|
181
181
|
puts
|
|
182
|
-
ok = @java_loc && @javac_loc && @ant_loc && @android_loc && @emulator_loc &&
|
|
182
|
+
ok = @java_loc && @javac_loc && @ant_loc && @android_loc && @emulator_loc && haxm_ok?(update) &&
|
|
183
|
+
@adb_loc && @dx_loc && @platform_sdk_loc.all? { |_, path| !path.nil? }
|
|
183
184
|
puts " #{ok ? '*** Ruboto setup is OK! ***' : '!!! Ruboto setup is NOT OK !!!'}\n\n"
|
|
184
185
|
ok
|
|
185
186
|
end
|
|
186
187
|
|
|
188
|
+
def haxm_ok?(update)
|
|
189
|
+
@haxm_kext_loc && !(update && haxm_old?)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
def haxm_old?
|
|
193
|
+
@haxm_kext_version != @haxm_installer_version
|
|
194
|
+
end
|
|
195
|
+
|
|
187
196
|
def check_for_emulator
|
|
188
197
|
@emulator_loc = check_for('emulator', 'Android Emulator',
|
|
189
198
|
File.join(android_package_directory, 'tools', 'emulator'))
|
|
@@ -194,24 +203,38 @@ module Ruboto
|
|
|
194
203
|
when MAC_OS_X
|
|
195
204
|
@haxm_kext_loc = '/Library/Extensions/intelhaxm.kext'
|
|
196
205
|
found = File.exist?(@haxm_kext_loc)
|
|
206
|
+
|
|
207
|
+
# FIXME(uwe): Remove when we stop supporting old HAXM installer versions, like mid 2016.
|
|
208
|
+
unless found
|
|
209
|
+
@haxm_kext_loc = '/System/Library/Extensions/intelhaxm.kext'
|
|
210
|
+
found = File.exist?(@haxm_kext_loc)
|
|
211
|
+
end
|
|
212
|
+
# EMXIF
|
|
213
|
+
|
|
197
214
|
if found
|
|
198
215
|
@haxm_kext_version = `kextstat | grep com.intel.kext.intelhaxm`.slice(/\(.*\)/)[1..-2]
|
|
199
216
|
else
|
|
200
217
|
@haxm_kext_loc = nil
|
|
201
218
|
end
|
|
202
219
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
220
|
+
@haxm_installer_loc = Dir[File.join(android_package_directory, 'extras', 'intel', 'Hardware_Accelerated_Execution_Manager', 'IntelHAXM_*.dmg')][0]
|
|
221
|
+
|
|
222
|
+
# FIXME(uwe): Remove when we stop supporting old HAXM installer versions, like mid 2016.
|
|
223
|
+
if @haxm_installer_loc.nil?
|
|
224
|
+
os_x_version = `sw_vers -productVersion`
|
|
225
|
+
if Gem::Version.new(os_x_version) > Gem::Version.new('10.9')
|
|
226
|
+
@haxm_installer_loc = Dir[File.join(android_package_directory, 'extras', 'intel', 'Hardware_Accelerated_Execution_Manager', 'IntelHAXM*_above*.dmg')][0]
|
|
227
|
+
else
|
|
228
|
+
@haxm_installer_loc = Dir[File.join(android_package_directory, 'extras', 'intel', 'Hardware_Accelerated_Execution_Manager', 'IntelHAXM*_below*.dmg')][0]
|
|
229
|
+
end
|
|
208
230
|
end
|
|
231
|
+
# EMXIF
|
|
209
232
|
|
|
210
|
-
@haxm_installer_version = @haxm_installer_loc.scan(/\d+/).join('.')
|
|
211
|
-
if
|
|
212
|
-
puts "#{'%-25s' % 'Intel HAXM'}: #{(found ? "Found" : 'Not found')}"
|
|
213
|
-
else
|
|
233
|
+
@haxm_installer_version = File.basename(@haxm_installer_loc).scan(/\d+/).join('.') unless @haxm_installer_loc.nil? || @haxm_installer_loc.empty?
|
|
234
|
+
if haxm_old?
|
|
214
235
|
puts "#{'%-25s' % 'Intel HAXM'}: Old #{@haxm_kext_version}/#{@haxm_installer_version}"
|
|
236
|
+
else
|
|
237
|
+
puts "#{'%-25s' % 'Intel HAXM'}: #{(found ? 'Found' : 'Not found')}"
|
|
215
238
|
end
|
|
216
239
|
when LINUX
|
|
217
240
|
@haxm_installer_loc = 'Not supported, yet.'
|
|
@@ -264,7 +287,7 @@ module Ruboto
|
|
|
264
287
|
end
|
|
265
288
|
|
|
266
289
|
def check_for_android_platform(api_level)
|
|
267
|
-
@platform_sdk_loc[api_level] = File.expand_path "#{
|
|
290
|
+
@platform_sdk_loc[api_level] = File.expand_path "#{android_package_directory}/platforms/#{api_level}"
|
|
268
291
|
found = File.exist? @platform_sdk_loc[api_level]
|
|
269
292
|
@platform_sdk_loc[api_level] = nil unless found
|
|
270
293
|
puts "#{'%-25s' % "Platform SDK #{api_level}"}: #{(found ? 'Found' : 'Not found')}"
|
|
@@ -284,8 +307,8 @@ module Ruboto
|
|
|
284
307
|
|
|
285
308
|
# build-tools, platform-tools, tools, and haxm
|
|
286
309
|
install_android_tools(accept_all) unless @dx_loc && @adb_loc && @emulator_loc && @haxm_installer_loc
|
|
287
|
-
install_haxm(accept_all) unless
|
|
288
|
-
download_and_upgrade_haxm(true)
|
|
310
|
+
install_haxm(accept_all) unless haxm_ok?(upgrade_haxm)
|
|
311
|
+
# download_and_upgrade_haxm(true) if upgrade_haxm
|
|
289
312
|
|
|
290
313
|
if @android_loc
|
|
291
314
|
api_levels.each do |api_level|
|
|
@@ -590,7 +613,7 @@ module Ruboto
|
|
|
590
613
|
end
|
|
591
614
|
if accept_all || a == 'Y' || a.empty?
|
|
592
615
|
android_cmd = windows? ? 'android.bat' : 'android'
|
|
593
|
-
update_cmd = "#{android_cmd} --silent update sdk --no-ui --filter build-tools-#{get_tools_version('build-tool')},extra-intel-Hardware_Accelerated_Execution_Manager,platform-tool,tool
|
|
616
|
+
update_cmd = "#{android_cmd} --silent update sdk --no-ui --filter build-tools-#{get_tools_version('build-tool')},extra-intel-Hardware_Accelerated_Execution_Manager,platform-tool,tool"
|
|
594
617
|
update_sdk(update_cmd, accept_all)
|
|
595
618
|
check_for_build_tools
|
|
596
619
|
check_for_platform_tools
|
|
@@ -634,18 +657,26 @@ module Ruboto
|
|
|
634
657
|
end
|
|
635
658
|
|
|
636
659
|
def install_haxm(accept_all, custom_version=nil)
|
|
637
|
-
filename = nil
|
|
638
660
|
haxm_file_override = "IntelHAXM_#{custom_version}.dmg" unless custom_version.nil?
|
|
639
|
-
if @haxm_installer_loc && @haxm_kext_loc.nil?
|
|
640
|
-
|
|
661
|
+
if @haxm_installer_loc && (@haxm_kext_loc.nil? || haxm_old?)
|
|
662
|
+
if @haxm_kext_loc.nil?
|
|
663
|
+
puts 'HAXM not installed.'
|
|
664
|
+
else
|
|
665
|
+
puts "HAXM is old: #{@haxm_kext_version} / #{@haxm_installer_version}"
|
|
666
|
+
end
|
|
667
|
+
|
|
641
668
|
unless accept_all
|
|
642
|
-
|
|
669
|
+
if @haxm_kext_loc.nil?
|
|
670
|
+
print 'Would you like to install HAXM? (Y/n): '
|
|
671
|
+
else
|
|
672
|
+
print 'Would you like to update HAXM? (Y/n): '
|
|
673
|
+
end
|
|
643
674
|
a = STDIN.gets.chomp.upcase
|
|
644
675
|
end
|
|
645
676
|
if accept_all || a == 'Y' || a.empty?
|
|
646
677
|
case android_package_os_id
|
|
647
678
|
when MAC_OS_X
|
|
648
|
-
puts
|
|
679
|
+
puts 'Mounting the HAXM install image'
|
|
649
680
|
if custom_version.nil?
|
|
650
681
|
system "hdiutil attach #{@haxm_installer_loc}"
|
|
651
682
|
fileName = Dir['/Volumes/IntelHAXM*/IntelHAXM*.mpkg'][0]
|
|
@@ -653,7 +684,7 @@ module Ruboto
|
|
|
653
684
|
system "hdiutil attach #{android_haxm_directory}/#{haxm_file_override}"
|
|
654
685
|
fileName = Dir["/Volumes/IntelHAXM_#{custom_version}/IntelHAXM_#{custom_version}.mpkg"][0]
|
|
655
686
|
end
|
|
656
|
-
puts
|
|
687
|
+
puts 'Starting the HAXM installer. Sudo password required.'
|
|
657
688
|
system "sudo -S installer -pkg #{fileName} -target /"
|
|
658
689
|
when LINUX
|
|
659
690
|
puts ' HAXM installation on Linux is not supported, yet.'
|
data/lib/ruboto/util/update.rb
CHANGED
|
@@ -490,9 +490,6 @@ module Ruboto
|
|
|
490
490
|
'com/kenai/jffi',
|
|
491
491
|
'com/kenai/jnr/x86asm',
|
|
492
492
|
'com/martiansoftware',
|
|
493
|
-
'com/oracle/nfi',
|
|
494
|
-
'com/oracle/truffle',
|
|
495
|
-
'java',
|
|
496
493
|
'jni',
|
|
497
494
|
'jnr/constants/platform/darwin',
|
|
498
495
|
'jnr/constants/platform/fake',
|
|
@@ -527,22 +524,11 @@ module Ruboto
|
|
|
527
524
|
# 'org/jruby/runtime/invokedynamic', # Should be excluded
|
|
528
525
|
# 'org/jruby/runtime/opto', # What is this?
|
|
529
526
|
# 'org/jruby/runtime/opto/OptoFactory*', # What is this?
|
|
530
|
-
'org/jruby/truffle',
|
|
531
|
-
'org/jruby/truffle/*.class',
|
|
532
|
-
'org/jruby/truffle/nodes',
|
|
533
|
-
'org/jruby/truffle/runtime/control',
|
|
534
|
-
'org/jruby/truffle/runtime/core',
|
|
535
|
-
'org/jruby/truffle/runtime/methods',
|
|
536
|
-
'org/jruby/truffle/runtime/signal',
|
|
537
|
-
'org/jruby/truffle/runtime/subsystems',
|
|
538
|
-
'org/jruby/truffle/runtime/util',
|
|
539
|
-
'org/jruby/truffle/runtime/*.class',
|
|
540
|
-
'org/jruby/truffle/translator',
|
|
541
527
|
]
|
|
542
528
|
elsif gem_version >= Gem::Version.new('9.0.0.0.SNAPSHOT')
|
|
543
529
|
raise "Unsupported jruby-jars version: #{gem_version}"
|
|
544
|
-
elsif gem_version >= Gem::Version.new('1.7.
|
|
545
|
-
# TODO(uwe): Remove when we stop supporting jruby-jars 1.7.
|
|
530
|
+
elsif gem_version >= Gem::Version.new('1.7.25.dev')
|
|
531
|
+
# TODO(uwe): Remove when we stop supporting jruby-jars 1.7.25
|
|
546
532
|
excluded_core_packages = [
|
|
547
533
|
'**/*Aix*',
|
|
548
534
|
'**/*Darwin*',
|
|
@@ -551,7 +537,6 @@ module Ruboto
|
|
|
551
537
|
'**/*OpenBSD*',
|
|
552
538
|
'**/*Solaris*',
|
|
553
539
|
'**/*sunos*',
|
|
554
|
-
'**/*Windows*',
|
|
555
540
|
'META-INF',
|
|
556
541
|
'com/headius/invokebinder',
|
|
557
542
|
'com/headius/options/example',
|
|
@@ -559,8 +544,8 @@ module Ruboto
|
|
|
559
544
|
'com/kenai/jffi',
|
|
560
545
|
'com/kenai/jnr/x86asm',
|
|
561
546
|
'com/martiansoftware',
|
|
562
|
-
'java',
|
|
563
547
|
'jni',
|
|
548
|
+
'jnr/**/*windows*',
|
|
564
549
|
'jnr/constants/platform/fake',
|
|
565
550
|
'jnr/enxio',
|
|
566
551
|
'jnr/ffi/annotations',
|
|
@@ -571,6 +556,7 @@ module Ruboto
|
|
|
571
556
|
'jnr/ffi/Struct$*',
|
|
572
557
|
'jnr/ffi/types',
|
|
573
558
|
'jnr/x86asm',
|
|
559
|
+
'org/jruby/**/*windows*',
|
|
574
560
|
'org/jruby/ant',
|
|
575
561
|
'org/jruby/cext',
|
|
576
562
|
'org/jruby/compiler/impl/BaseBodyCompiler*',
|
|
@@ -586,17 +572,16 @@ module Ruboto
|
|
|
586
572
|
'org/jruby/javasupport/bsf',
|
|
587
573
|
'org/yecht',
|
|
588
574
|
]
|
|
589
|
-
elsif gem_version >= Gem::Version.new('1.7.
|
|
590
|
-
# TODO(uwe): Remove when we stop supporting jruby-jars 1.7.
|
|
575
|
+
elsif gem_version >= Gem::Version.new('1.7.24.dev')
|
|
576
|
+
# TODO(uwe): Remove when we stop supporting jruby-jars 1.7.24
|
|
591
577
|
excluded_core_packages = [
|
|
592
578
|
'**/*Aix*',
|
|
593
579
|
'**/*Darwin*',
|
|
594
|
-
|
|
580
|
+
'**/*FreeBSD*',
|
|
595
581
|
'**/*MacOS*',
|
|
596
582
|
'**/*OpenBSD*',
|
|
597
583
|
'**/*Solaris*',
|
|
598
584
|
'**/*sunos*',
|
|
599
|
-
'**/*Windows*',
|
|
600
585
|
'META-INF',
|
|
601
586
|
'com/headius/invokebinder',
|
|
602
587
|
'com/headius/options/example',
|
|
@@ -605,6 +590,7 @@ module Ruboto
|
|
|
605
590
|
'com/kenai/jnr/x86asm',
|
|
606
591
|
'com/martiansoftware',
|
|
607
592
|
'jni',
|
|
593
|
+
'jnr/**/*windows*',
|
|
608
594
|
'jnr/constants/platform/fake',
|
|
609
595
|
'jnr/enxio',
|
|
610
596
|
'jnr/ffi/annotations',
|
|
@@ -615,6 +601,7 @@ module Ruboto
|
|
|
615
601
|
'jnr/ffi/Struct$*',
|
|
616
602
|
'jnr/ffi/types',
|
|
617
603
|
'jnr/x86asm',
|
|
604
|
+
'org/jruby/**/*windows*',
|
|
618
605
|
'org/jruby/ant',
|
|
619
606
|
'org/jruby/cext',
|
|
620
607
|
'org/jruby/compiler/impl/BaseBodyCompiler*',
|
|
@@ -630,6 +617,12 @@ module Ruboto
|
|
|
630
617
|
'org/jruby/javasupport/bsf',
|
|
631
618
|
'org/yecht',
|
|
632
619
|
]
|
|
620
|
+
elsif gem_version >= Gem::Version.new('1.7.23')
|
|
621
|
+
# TODO(uwe): Remove when we stop supporting jruby-jars 1.7.23
|
|
622
|
+
excluded_core_packages = %w(**/*Aix* **/*Darwin* **/*FreeBSD* **/*MacOS* **/*OpenBSD* **/*Solaris* **/*sunos* **/*Windows* META-INF com/headius/invokebinder com/headius/options/example com/kenai/constantine com/kenai/jffi com/kenai/jnr/x86asm com/martiansoftware java jni jnr/constants/platform/fake jnr/enxio jnr/ffi/annotations jnr/ffi/byref jnr/ffi/mapper jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types 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/Enums* org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/javasupport/bsf org/yecht)
|
|
623
|
+
elsif gem_version >= Gem::Version.new('1.7.22')
|
|
624
|
+
# TODO(uwe): Remove when we stop supporting jruby-jars 1.7.22
|
|
625
|
+
excluded_core_packages = %w(**/*Aix* **/*Darwin* **/*FreeBSD* **/*MacOS* **/*OpenBSD* **/*Solaris* **/*sunos* **/*Windows* META-INF com/headius/invokebinder com/headius/options/example com/kenai/constantine com/kenai/jffi com/kenai/jnr/x86asm com/martiansoftware jni jnr/constants/platform/fake jnr/enxio jnr/ffi/annotations jnr/ffi/byref jnr/ffi/mapper jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types 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/Enums* org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/javasupport/bsf org/yecht)
|
|
633
626
|
elsif gem_version >= Gem::Version.new('1.7.19')
|
|
634
627
|
# TODO(uwe): Remove when we stop supporting jruby-jars 1.7.19
|
|
635
628
|
excluded_core_packages = %w(**/*.sh **/*Darwin* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius/invokebinder com/headius/options/example 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/enxio 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/Enums* org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/javasupport/bsf org/yecht yaml.rb)
|
data/lib/ruboto/version.rb
CHANGED
data/test/app_test_methods.rb
CHANGED
|
@@ -38,17 +38,9 @@ module AppTestMethods
|
|
|
38
38
|
|
|
39
39
|
def run_activity_tests(activity_dir)
|
|
40
40
|
Dir[File.expand_path("#{activity_dir}/*", File.dirname(__FILE__))].each do |file|
|
|
41
|
-
# FIXME(uwe): Remove when we stop testing JRuby 1.7.
|
|
42
|
-
next if file =~ /rss/ &&
|
|
43
|
-
RUBOTO_PLATFORM == 'STANDALONE' && ANDROID_OS == 19
|
|
44
|
-
# EMXIF
|
|
45
|
-
|
|
46
|
-
# FIXME(uwe): Remove when we stop testing JRuby < 1.7.20.dev
|
|
47
|
-
next if file =~ /rss/ && (JRUBY_JARS_VERSION < Gem::Version.new('1.7.20.dev'))
|
|
48
|
-
# EMXIF
|
|
49
|
-
|
|
50
|
-
# FIXME(uwe): Remove when we release RubotoCore based on JRuby 1.7.20
|
|
51
|
-
next if file =~ /rss/ && (RUBOTO_PLATFORM == 'CURRENT' || RUBOTO_PLATFORM == 'FROM_GEM')
|
|
41
|
+
# FIXME(uwe): Remove when we stop testing JRuby 1.7.24 or api level 19
|
|
42
|
+
next if file =~ /rss/ && JRUBY_JARS_VERSION <= Gem::Version.new('1.7.24') &&
|
|
43
|
+
(RUBOTO_PLATFORM == 'STANDALONE' || RUBOTO_PLATFORM == 'CURRENT') && ANDROID_OS == 19
|
|
52
44
|
# EMXIF
|
|
53
45
|
|
|
54
46
|
# FIXME(uwe): Remove when we stop testing api level < 16
|
data/test/minimal_app_test.rb
CHANGED
|
@@ -21,7 +21,8 @@ if RubotoTest::RUBOTO_PLATFORM == 'STANDALONE'
|
|
|
21
21
|
# APK was 4.3MB. JRuby: 1.7.8, ANDROID_TARGET: 16
|
|
22
22
|
# APK was 4.4MB. JRuby: 1.7.12, ANDROID_TARGET: 19
|
|
23
23
|
# APK was 4.4MB. JRuby: 1.7.14, ANDROID_TARGET: 19
|
|
24
|
-
# APK was 4.6MB. JRuby: 1.7.20
|
|
24
|
+
# APK was 4.6MB. JRuby: 1.7.20, ANDROID_TARGET: 19
|
|
25
|
+
# APK was 4.7MB. JRuby: 1.7.24, ANDROID_TARGET: 23
|
|
25
26
|
# APK was 4.2MB. JRuby: 9000.dev, ANDROID_TARGET: 10
|
|
26
27
|
# APK was 4.2MB. JRuby: 9000.dev, ANDROID_TARGET: 15
|
|
27
28
|
# APK was 4.6MB. JRuby: 9000.dev, ANDROID_TARGET: 16
|
|
@@ -35,9 +36,10 @@ if RubotoTest::RUBOTO_PLATFORM == 'STANDALONE'
|
|
|
35
36
|
'1.7.11' => 4.4,
|
|
36
37
|
'1.7.12' => 4.4,
|
|
37
38
|
'1.7.14' => 4.4,
|
|
38
|
-
'1.7.20
|
|
39
|
+
'1.7.20' => 4.6,
|
|
40
|
+
'1.7.24' => 4.7,
|
|
39
41
|
'9.0.0.0.dev' => 4.6,
|
|
40
|
-
}[JRUBY_JARS_VERSION.to_s] || 4.
|
|
42
|
+
}[JRUBY_JARS_VERSION.to_s] || 4.7
|
|
41
43
|
lower_limit = upper_limit * 0.9
|
|
42
44
|
version_message ="JRuby: #{JRUBY_JARS_VERSION}, ANDROID_TARGET: #{ANDROID_TARGET}"
|
|
43
45
|
assert apk_size <= upper_limit, "APK was larger than #{'%.1f' % upper_limit}MB: #{'%.1f' % apk_size.ceil(1)}MB. #{version_message}"
|
data/test/ruboto_gen_test.rb
CHANGED
|
@@ -79,48 +79,42 @@ class RubotoGenTest < Minitest::Test
|
|
|
79
79
|
# APK was 6721.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.19
|
|
80
80
|
# APK was 7882.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 19, JRuby: 1.7.19
|
|
81
81
|
# APK was 10109.9KB. PLATFORM: STANDALONE, ANDROID_TARGET: 21, JRuby: 1.7.19
|
|
82
|
-
|
|
83
|
-
#
|
|
84
|
-
# APK was 7040.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.20.dev
|
|
85
|
-
# APK was 8938.8KB. PLATFORM: STANDALONE, ANDROID_TARGET: 19, JRuby: 1.7.20.dev
|
|
86
|
-
|
|
87
|
-
# APK was 6689.5KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 9000.dev
|
|
88
|
-
# APK was 7012.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 9000.dev
|
|
89
|
-
# APK was 8015.9KB. PLATFORM: STANDALONE, ANDROID_TARGET: 17, JRuby: 9000.dev
|
|
90
|
-
# APK was 8232.4KB. PLATFORM: STANDALONE, ANDROID_TARGET: 19, JRuby: 9000.dev
|
|
91
|
-
# APK was 7126.9KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 9.0.0.0.pre1
|
|
92
|
-
# APK was 8571.4KB. PLATFORM: STANDALONE, ANDROID_TARGET: 21, JRuby: 9.0.0.0.pre1
|
|
93
|
-
# APK was 4633.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 22, JRuby: 9.0.0.0.SNAPSHOT
|
|
82
|
+
# APK was 7040.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.20
|
|
83
|
+
# APK was 8938.8KB. PLATFORM: STANDALONE, ANDROID_TARGET: 19, JRuby: 1.7.20
|
|
94
84
|
# APK was 6999.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.22
|
|
95
|
-
# APK was
|
|
85
|
+
# APK was 8501.5KB. PLATFORM: STANDALONE, ANDROID_TARGET: 23, JRuby: 1.7.22
|
|
86
|
+
# APK was 7006.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.23
|
|
87
|
+
# APK was 7083.4KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.24
|
|
88
|
+
# APK was 8596.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 19, JRuby: 1.7.24
|
|
89
|
+
# APK was 7081.8KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.25.dev
|
|
90
|
+
# APK was 4633.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 22, JRuby: 9.0.0.0.SNAPSHOT
|
|
91
|
+
# APK was 8762.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 23, JRuby: 9.0.5.0.SNAPSHOT
|
|
92
|
+
LIMITS = {
|
|
93
|
+
'~>9.0.5.0.SNAPSHOT' => ANDROID_TARGET <= 15 ? 7200 : 9800.0,
|
|
94
|
+
'~>1.7.24' => ANDROID_TARGET <= 15 ? 7200 : 9000.0,
|
|
95
|
+
'~>1.7.22' => ANDROID_TARGET <= 15 ? 7200 : 9000.0,
|
|
96
|
+
'1.7.20' => ANDROID_TARGET <= 15 ? 8000 : 9000.0,
|
|
97
|
+
'1.7.19' => 8000.0,
|
|
98
|
+
'1.7.18' => 10100.0,
|
|
99
|
+
'1.7.17' => 9999.0,
|
|
100
|
+
'1.7.15' => 8000.0,
|
|
101
|
+
'1.7.14' => 9800.0,
|
|
102
|
+
'1.7.13' => 8000.0,
|
|
103
|
+
'1.7.12' => 9800.0,
|
|
104
|
+
'~>1.7.5' => 8800.0,
|
|
105
|
+
'1.7.4' => 8500.0,
|
|
106
|
+
}
|
|
107
|
+
|
|
96
108
|
def test_new_apk_size_is_within_limits
|
|
97
109
|
apk_size = BigDecimal(File.size("#{APP_DIR}/bin/RubotoTestApp-debug.apk").to_s) / 1024
|
|
98
|
-
|
|
99
|
-
|
|
110
|
+
version_string = " PLATFORM: #{RUBOTO_PLATFORM}"
|
|
111
|
+
version_string << ", ANDROID_TARGET: #{ANDROID_TARGET}"
|
|
100
112
|
if RUBOTO_PLATFORM == 'STANDALONE'
|
|
101
|
-
upper_limit =
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
'1.7.9' => 8800.0,
|
|
107
|
-
'1.7.10' => 8800.0,
|
|
108
|
-
'1.7.11' => 8800.0,
|
|
109
|
-
'1.7.12' => 9800.0,
|
|
110
|
-
'1.7.13' => 8000.0,
|
|
111
|
-
'1.7.14' => 9800.0,
|
|
112
|
-
'1.7.15' => 8000.0,
|
|
113
|
-
'1.7.17' => 9999.0,
|
|
114
|
-
'1.7.18' => 10100.0,
|
|
115
|
-
'1.7.19' => 8000.0,
|
|
116
|
-
'1.7.20.dev' => ANDROID_TARGET <= 15 ? 8000 : 9000.0,
|
|
117
|
-
'1.7.22' => ANDROID_TARGET <= 15 ? 7200 : 9000.0,
|
|
118
|
-
'1.7.23.dev' => ANDROID_TARGET <= 15 ? 7200 : 9000.0,
|
|
119
|
-
'9.0.0.0.dev' => 8300.0,
|
|
120
|
-
'9.0.0.0.pre1' => 8600.0,
|
|
121
|
-
'9.0.0.0.SNAPSHOT' => 5000.0,
|
|
122
|
-
}[JRUBY_JARS_VERSION.to_s] || 9800.0
|
|
123
|
-
version << ", JRuby: #{JRUBY_JARS_VERSION.to_s}"
|
|
113
|
+
upper_limit = LIMITS.each do |version_spec, value|
|
|
114
|
+
break value if Gem::Requirement.new(version_spec) =~ JRUBY_JARS_VERSION
|
|
115
|
+
end
|
|
116
|
+
raise "Unknown JRuby version: #{JRUBY_JARS_VERSION}" if upper_limit == LIMITS
|
|
117
|
+
version_string << ", JRuby: #{JRUBY_JARS_VERSION.to_s}"
|
|
124
118
|
else
|
|
125
119
|
upper_limit = {
|
|
126
120
|
10 => 67.0,
|
|
@@ -132,8 +126,8 @@ class RubotoGenTest < Minitest::Test
|
|
|
132
126
|
}[ANDROID_TARGET] || 76.0
|
|
133
127
|
end
|
|
134
128
|
lower_limit = upper_limit * 0.8
|
|
135
|
-
assert apk_size <= upper_limit, "APK was larger than #{'%.1f' % upper_limit}KB: #{'%.1f' % apk_size.ceil(1)}KB.#{
|
|
136
|
-
assert apk_size >= lower_limit, "APK was smaller than #{'%.1f' % lower_limit}KB: #{'%.1f' % apk_size.floor(1)}KB. You should lower the limit.#{
|
|
129
|
+
assert apk_size <= upper_limit, "APK was larger than #{'%.1f' % upper_limit}KB: #{'%.1f' % apk_size.ceil(1)}KB.#{version_string}"
|
|
130
|
+
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_string}"
|
|
137
131
|
end
|
|
138
132
|
|
|
139
133
|
def test_gen_subclass
|
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.4.
|
|
4
|
+
version: 1.4.1
|
|
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:
|
|
14
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: main
|
|
@@ -90,7 +90,6 @@ files:
|
|
|
90
90
|
- Vagrantfile
|
|
91
91
|
- assets/.gitignore
|
|
92
92
|
- assets/Rakefile
|
|
93
|
-
- assets/bin/LAST_UPDATE
|
|
94
93
|
- assets/libs/dx.jar
|
|
95
94
|
- assets/rakelib/ruboto.device.rb
|
|
96
95
|
- assets/rakelib/ruboto.rake
|
|
@@ -256,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
256
255
|
version: '0'
|
|
257
256
|
requirements: []
|
|
258
257
|
rubyforge_project: ruboto/ruboto
|
|
259
|
-
rubygems_version: 2.4.
|
|
258
|
+
rubygems_version: 2.4.8
|
|
260
259
|
signing_key:
|
|
261
260
|
specification_version: 4
|
|
262
261
|
summary: A platform for developing apps using JRuby on Android.
|