ruboto 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -6
  3. data/RELEASE_CANDICATE_DOC.md +5 -3
  4. data/RELEASE_DOC.md +32 -11
  5. data/Rakefile +86 -36
  6. data/assets/rakelib/ruboto.rake +33 -14
  7. data/assets/rakelib/ruboto.stdlib.rake +1 -1
  8. data/assets/res/layout/get_ruboto_core.xml +1 -2
  9. data/assets/src/RubotoService.java +19 -2
  10. data/assets/src/org/ruboto/JRubyAdapter.java +4 -0
  11. data/assets/src/org/ruboto/SplashActivity.java +17 -17
  12. data/assets/src/ruboto/base.rb +13 -4
  13. data/assets/src/ruboto/package.rb +12 -3
  14. data/assets/src/ruboto/service.rb +45 -8
  15. data/assets/src/ruboto/widget.rb +82 -39
  16. data/assets/test/src/test_helper.rb +4 -0
  17. data/lib/ruboto/commands/base.rb +29 -17
  18. data/lib/ruboto/sdk_versions.rb +1 -1
  19. data/lib/ruboto/util/emulator.rb +49 -33
  20. data/lib/ruboto/util/setup.rb +5 -1
  21. data/lib/ruboto/util/update.rb +68 -22
  22. data/lib/ruboto/util/xml_element.rb +5 -3
  23. data/lib/ruboto/version.rb +1 -1
  24. data/test/activity/call_super_activity.rb +2 -2
  25. data/test/activity/constants_activity.rb +51 -0
  26. data/test/activity/constants_activity_test.rb +18 -0
  27. data/test/activity/margins_activity.rb +12 -7
  28. data/test/activity/margins_activity_test.rb +10 -6
  29. data/test/activity/padding_activity.rb +15 -0
  30. data/test/activity/padding_activity_test.rb +41 -0
  31. data/test/activity/rss_activity.rb +42 -0
  32. data/test/activity/rss_activity_test.rb +35 -0
  33. data/test/activity/spinner_activity.rb +5 -5
  34. data/test/activity/spinner_activity_test.rb +6 -6
  35. data/test/activity/stack_activity.rb +7 -8
  36. data/test/activity/stack_activity_test.rb +7 -5
  37. data/test/activity/subclass_activity.rb +5 -5
  38. data/test/activity/subclass_activity_test.rb +8 -6
  39. data/test/app_test_methods.rb +8 -0
  40. data/test/arjdbc_test.rb +1 -1
  41. data/test/minimal_app_test.rb +12 -10
  42. data/test/rake_test.rb +2 -4
  43. data/test/ruboto_gen_test.rb +11 -9
  44. data/test/service_block_test.rb +112 -0
  45. data/test/{service_test.rb → service_gen_class_test.rb} +9 -4
  46. data/test/service_infile_class_test.rb +114 -0
  47. data/test/sqldroid_test.rb +1 -1
  48. data/test/test_helper.rb +39 -21
  49. metadata +11 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e57b8cc5a38858a5680903fef8481da9866af40
4
- data.tar.gz: 17a24cf8930538aeadc4c8e2677e81d4f82fedf8
3
+ metadata.gz: 04f53460885c0bb561a901a29c3e9b91a2110fc4
4
+ data.tar.gz: e0cf0b0f70589da752f91b35331ac47cb761d334
5
5
  SHA512:
6
- metadata.gz: 4f0d41dc5bfaef0a360d6e8d3a0c2f2f32e63bf4684d53f664b5a2dd912a876b4f791e331fc7cf074c14511c0a69544b4a6112318d6f9212101aa194c35a8a35
7
- data.tar.gz: 7a35ed6164916ab2027ae5ac2c83f2e214f91c006025e72e2632c6502edb98c0c9138a5bfeb994966fd40e90d545c8771804f46c241e696b523ed7ba9f6fdda1
6
+ metadata.gz: d8025d008cc28e62365dc4668065b5d4feddbb710a9fc836b24610069a42eb3a20653ec55d711619c043e3fb4d1385f9e5c268999c91f4b4fd03b9c5d70a2733
7
+ data.tar.gz: d04a199b80a4e09444b9efede9333fcb5871aa7751f7fe361eb6d5e78b4e7aa13b8206a8e8a942593aff3379c36954abf21bbe751ae7cef0f3985ed09be7dbf6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruboto (1.1.2)
4
+ ruboto (1.2.0)
5
5
  main (~> 5.2)
6
6
  rake (~> 10.0)
7
7
  rubyzip (~> 1.0)
@@ -19,18 +19,17 @@ GEM
19
19
  fattr (>= 2.2.0)
20
20
  map (>= 5.1.0)
21
21
  pry (>= 0.9)
22
- map (6.5.4)
22
+ map (6.5.5)
23
23
  method_source (0.8.2)
24
- pry (0.10.0)
24
+ pry (0.10.1)
25
25
  coderay (~> 1.1.0)
26
26
  method_source (~> 0.8.1)
27
27
  slop (~> 3.4)
28
28
  rake (10.3.2)
29
- rubyzip (1.1.4)
30
- slop (3.5.0)
29
+ rubyzip (1.1.6)
30
+ slop (3.6.0)
31
31
 
32
32
  PLATFORMS
33
- java
34
33
  ruby
35
34
 
36
35
  DEPENDENCIES
@@ -1,10 +1,12 @@
1
- Subject: [ANN] Ruboto 1.1.2 release candidate
1
+ Subject: [ANN] Ruboto 1.2.0 release candidate
2
2
 
3
3
  Hi all!
4
4
 
5
- The Ruboto 1.1.2 release candidate is now available.
5
+ The Ruboto 1.2.0 release candidate is now available.
6
6
 
7
- This is a quick release to add support for version 23 of the Android SDK.
7
+ In this release we add support for the Android L preview and the ART
8
+ runtime. We also specify accessing the "R" class without specifying a
9
+ package to refer to the local package "R" class instead of "android.R".
8
10
 
9
11
  As always we need your help and feedback to ensure the quality of the release. Please install the release candidate using
10
12
 
data/RELEASE_DOC.md CHANGED
@@ -1,6 +1,6 @@
1
- Subject: [ANN] Ruboto 1.1.2 released!
1
+ Subject: [ANN] Ruboto 1.2.0 released!
2
2
 
3
- The Ruboto team is pleased to announce the release of Ruboto 1.1.2.
3
+ The Ruboto team is pleased to announce the release of Ruboto 1.2.0.
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,24 +8,45 @@ 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.1.2:
11
+ New in version 1.2.0:
12
12
 
13
- This is a quick release to add support for version 23 of the Android SDK.
13
+ In this release we add support for the Android L preview and the ART
14
+ runtime. We also specify accessing the "R" class without specifying a
15
+ package to refer to the local package "R" class instead of "android.R".
16
+
17
+ Features:
18
+
19
+ * Issue #523 Support for ART
20
+ * Issue #645 Make ::R refer to $package.R instead of android.R
21
+ * Issue #652 Set a layout attribute by name even if it is not a JavaBean
22
+ attribute (like margins and padding).
23
+ * Issue #654 Access android.R inner classes like android.R.id and
24
+ android.R.attr directly
25
+ * Issue #656 Add support for Android L developer preview
14
26
 
15
27
  Bugfixes:
16
28
 
17
- * Issue #636 ruboto setup failing to install Android
18
- * Issue #637 Fixed match for SDK release versions (daneb)
19
- * Issue #639 Unit test fix (daneb)
20
- * Issue #641 Display progress text during linux package installs
29
+ * Issue #643 Stale code in widget.rb lists
30
+ * Issue #648 Service code is broken when trying to use RubotoService
31
+ directly
32
+ * Issue #667 Ruboto app generation with option --with-jruby 1.7.14 not
33
+ working properly
34
+ * Issue #671 RubotoService fails to start on Android L
35
+ * Issue #672 Problem with ruboto setup
36
+ * Issue #674 travis build fails with JRuby 1.7.16
37
+
38
+ Support:
39
+
40
+ * Issue #573 How can I load Ruboto Core Dynamically in Runtime?
21
41
 
22
- Internal:
42
+ Rejected:
23
43
 
24
- * Issue #633 Release 1.1.2 gem
44
+ * Issue #646 Make ANT quiet by default, enabling verbose and trace
45
+ output with the -v and -t rake options
25
46
 
26
47
  You can find a complete list of issues here:
27
48
 
28
- * https://github.com/ruboto/ruboto/issues?state=closed&milestone=34
49
+ * https://github.com/ruboto/ruboto/issues?state=closed&milestone=35
29
50
 
30
51
 
31
52
  Installation:
data/Rakefile CHANGED
@@ -143,7 +143,7 @@ def get_github_issues
143
143
  raise "Milestone for version #{Ruboto::VERSION} not found." unless milestone_entry
144
144
  milestone = milestone_entry['number']
145
145
 
146
- uri = URI("#{base_uri}/issues?milestone=#{milestone}&state=closed&per_page=1000")
146
+ uri = URI("#{base_uri}/issues?milestone=#{milestone}&state=closed&per_page=1000")
147
147
  req = Net::HTTP::Get.new(uri.request_uri)
148
148
  req.basic_auth(user, pass)
149
149
  res = https.start { |http| http.request(req) }
@@ -233,10 +233,10 @@ New in version #{milestone_name}:
233
233
  #{milestone_description}
234
234
 
235
235
  #{(categories.keys & grouped_issues.keys).map do |cat|
236
- "#{cat}:\n
236
+ "#{cat}:\n
237
237
  #{grouped_issues[cat].map { |i| %Q{* Issue ##{i['number']} #{i['title'].gsub('`', "'")}#{" (#{i['user']['login']})" if i['pull_request'] && i['pull_request']['html_url']}}.wrap(2) }.join("\n")}
238
238
  "
239
- end.join("\n")}
239
+ end.join("\n")}
240
240
  You can find a complete list of issues here:
241
241
 
242
242
  * https://github.com/ruboto/ruboto/issues?state=closed&milestone=#{milestone}
@@ -514,16 +514,43 @@ namespace :platform do
514
514
  'org.ruboto.core'
515
515
  end
516
516
 
517
+ def wait_for_valid_device
518
+ while `adb shell echo "ping"`.strip != 'ping'
519
+ `adb kill-server`
520
+ `adb devices`
521
+ sleep 5
522
+ end
523
+ end
524
+
517
525
  def install_apk
526
+ wait_for_valid_device
527
+
518
528
  failure_pattern = /^Failure \[(.*)\]/
519
529
  success_pattern = /^Success/
530
+ install_timeout = 300
520
531
  case package_installed?
521
532
  when true
522
533
  puts "Package #{package} already installed."
523
534
  return
524
535
  when false
525
- puts "Package #{package} already installed, but of different size. Replacing package."
526
- output = `adb install -r #{PLATFORM_CURRENT_RELEASE_APK} 2>&1`
536
+ puts "Package #{package} already installed, but of different size or timestamp. Replacing package."
537
+ sh "adb shell date -s #{Time.now.strftime '%Y%m%d.%H%M%S'}"
538
+ output = nil
539
+ install_retry_count = 0
540
+ begin
541
+ timeout install_timeout do
542
+ output = `adb install -r "#{PLATFORM_CURRENT_RELEASE_APK}" 2>&1`
543
+ end
544
+ rescue Timeout::Error
545
+ puts "Installing package #{package} timed out."
546
+ install_retry_count += 1
547
+ if install_retry_count <= 3
548
+ puts 'Retrying install...'
549
+ retry
550
+ end
551
+ puts 'Trying one final time to install the package:'
552
+ output = `adb install -r "#{PLATFORM_CURRENT_RELEASE_APK}" 2>&1`
553
+ end
527
554
  if $? == 0 && output !~ failure_pattern && output =~ success_pattern
528
555
  return
529
556
  end
@@ -535,26 +562,27 @@ namespace :platform do
535
562
  puts "Uninstalling #{package} and retrying install."
536
563
  end
537
564
  uninstall_apk
565
+ else
566
+ # Package not installed.
567
+ sh "adb shell date -s #{Time.now.strftime '%Y%m%d.%H%M%S'}"
538
568
  end
539
569
  puts "Installing package #{package}"
570
+ output = nil
540
571
  install_retry_count = 0
541
572
  begin
542
- output = nil
543
- timeout 180 do
544
- install_start = Time.now
545
- output = `adb install #{PLATFORM_CURRENT_RELEASE_APK} 2>&1`
546
- puts "Install took #{(Time.now - install_start).to_i}s."
573
+ timeout install_timeout do
574
+ output = `adb install "#{PLATFORM_CURRENT_RELEASE_APK}" 2>&1`
547
575
  end
548
- rescue TimeoutError
549
- puts 'Install of current RubotoCore timed out.'
576
+ rescue Timeout::Error
577
+ puts "Installing package #{package} timed out."
550
578
  install_retry_count += 1
551
579
  if install_retry_count <= 3
552
- puts 'Retrying.'
580
+ puts 'Retrying install...'
553
581
  retry
554
582
  end
555
- puts 'Retrying one final time...'
583
+ puts 'Trying one final time to install the package:'
556
584
  install_start = Time.now
557
- output = `adb install #{PLATFORM_CURRENT_RELEASE_APK} 2>&1`
585
+ output = `adb install "#{PLATFORM_CURRENT_RELEASE_APK}" 2>&1`
558
586
  puts "Install took #{(Time.now - install_start).to_i}s."
559
587
  end
560
588
  puts output
@@ -602,40 +630,62 @@ namespace :platform do
602
630
  end
603
631
 
604
632
  desc 'Download the latest jruby-jars snapshot'
605
- task :get_jruby_jars_snapshot do
606
- current_gem = 'jruby-jars-9000.dev.gem'
607
- print "Downloading #{current_gem}: \r"
608
- uri = URI("http://ci.jruby.org/snapshots/master/#{current_gem}")
609
- done = 0
610
- body = ''
611
- Net::HTTP.new(uri.host, uri.port).request_get(uri.path) do |response|
612
- length = response['Content-Length'].to_i
613
- response.read_body do |fragment|
614
- body << fragment
615
- done += fragment.length
616
- progress = (done * 100) / length
617
- print "Downloading #{current_gem}: #{done / 1024}/#{length / 1024}KB #{progress}%\r"
633
+ task :get_jruby_jars_snapshots do
634
+ download_host = 'lafo.ssw.uni-linz.ac.at'
635
+ index = Net::HTTP.get(download_host, "/graalvm/")
636
+ current_gems = index.scan(/jruby-jars-.*?.gem/).uniq
637
+ current_gems.each do |gem|
638
+ print "Downloading #{gem}: \r"
639
+ uri = URI("http://#{download_host}/graalvm/#{gem}")
640
+ done = 0
641
+ body = ''
642
+ Net::HTTP.new(uri.host, uri.port).request_get(uri.path) do |response|
643
+ length = response['Content-Length'].to_i
644
+ response.read_body do |fragment|
645
+ body << fragment
646
+ done += fragment.length
647
+ progress = (done * 100) / length
648
+ print "Downloading #{gem}: #{done / 1024}/#{length / 1024}KB #{progress}%\r"
649
+ end
650
+ puts
618
651
  end
619
- puts
652
+ File.open(gem, 'wb') { |f| f << body }
620
653
  end
621
- File.open(current_gem, 'wb') { |f| f << body }
622
654
  end
623
655
 
624
656
  task '.travis.yml' do
625
657
  puts "Regenerating #{'.travis.yml'}"
626
658
  source = File.read('.travis.yml')
627
659
  matrix = ''
628
- [17, 16, 15].each.with_index do |api, i|
660
+ allow_failures = ''
661
+ [19, 17, 16, 15].each.with_index do |api, i|
629
662
  n = i
630
- [['CURRENT', [nil]],['FROM_GEM', [nil]],['STANDALONE', [nil, '1.7.13', '1.7.12'].rotate(-i)]].each do |platform, versions|
663
+ [['CURRENT', [nil]], ['FROM_GEM', [:MASTER, :STABLE]], ['STANDALONE', [:MASTER, :STABLE, '1.7.13']]].each do |platform, versions|
631
664
  versions.each do |v|
632
- n = (n % 5) + 1
633
- matrix << " - ANDROID_TARGET=#{api} RUBOTO_PLATFORM=#{platform.ljust(10)} TEST_PART=#{n}of5#{" JRUBY_JARS_VERSION=#{v}" if v}\n"
665
+ n = (n % 5) + 1
666
+ line = " - ANDROID_TARGET=#{api} RUBOTO_PLATFORM=#{platform.ljust(10)} TEST_PART=#{n}of5#{" JRUBY_JARS_VERSION=#{v}" if v}\n"
667
+ matrix << line
668
+ if (platform == 'STANDALONE' && v == :MASTER) ||
669
+ # FIXME(uwe): Remove when master and stable branches are green.
670
+ v == :MASTER || v == :STABLE ||
671
+ # FIXME(uwe): Remove when master and stable branches are green.
672
+ v == '1.7.16'
673
+ # EMXiF
674
+ allow_failures << line.gsub('-', '- env:')
675
+ end
634
676
  end
635
677
  end
636
678
  matrix << "\n"
637
679
  end
638
680
  matrix << " - ANDROID_TARGET=10 RUBOTO_PLATFORM=CURRENT\n"
639
- matrix_str = " matrix:\n#{matrix}\nmatrix:"
640
- File.write('.travis.yml', source.sub(/^ matrix:.*?matrix:/m, matrix_str))
681
+ matrix_str = " matrix:\n#{matrix}\n"
682
+ allow_failures_str = <<EOF
683
+ allow_failures:
684
+ # Current master is failing: https://github.com/jruby/jruby/issues/1741
685
+ # Current JRuby 1.7.x gem is failing. Why?
686
+ #{allow_failures}
687
+ EOF
688
+ File.write('.travis.yml', source.
689
+ sub(/^ matrix:.*?(?=^matrix:)/m, matrix_str).
690
+ sub(/^ allow_failures:.*?(?=^script:)/m, allow_failures_str))
641
691
  end
@@ -7,13 +7,19 @@ require 'timeout'
7
7
 
8
8
  ON_WINDOWS = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw/i)
9
9
 
10
- ANT_CMD = ON_WINDOWS ? 'ant.bat' : 'ant'
10
+ ANT_BINARY = ON_WINDOWS ? 'ant.bat' : 'ant'
11
+ ANT_VERSION_CMD = "#{ANT_BINARY} -version"
11
12
 
12
- if `#{ANT_CMD} -version` !~ /version (\d+)\.(\d+)\.(\d+)/ || $1.to_i < 1 || ($1.to_i == 1 && $2.to_i < 8)
13
+ if (ant_version_output = `#{ANT_VERSION_CMD}`) !~ /version (\d+)\.(\d+)\.(\d+)/ || $1.to_i < 1 || ($1.to_i == 1 && $2.to_i < 8)
14
+ puts ANT_VERSION_CMD
15
+ puts ant_version_output
13
16
  puts "ANT version 1.8.0 or later required. Version found: #{$1}.#{$2}.#{$3}"
14
17
  exit 1
15
18
  end
16
19
 
20
+ ANT_CMD = ANT_BINARY.dup
21
+ ANT_CMD << ' -v' if Rake.application.options.trace == true
22
+
17
23
  #
18
24
  # OS independent "which"
19
25
  # From: http://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby
@@ -230,8 +236,17 @@ file PROJECT_PROPS_FILE
230
236
  file MANIFEST_FILE => PROJECT_PROPS_FILE do
231
237
  old_manifest = File.read(MANIFEST_FILE)
232
238
  manifest = old_manifest.dup
233
- manifest.sub!(/(android:minSdkVersion=').*?(')/) { "#$1#{sdk_level}#$2" }
234
- manifest.sub!(/(android:targetSdkVersion=').*?(')/) { "#$1#{sdk_level}#$2" }
239
+
240
+ # FIXME(uwe): Remove 'L' special case when Android L has been released.
241
+ if sdk_level == 21
242
+ manifest.sub!(/(android:minSdkVersion=').*?(')/) { "#$1L#$2" }
243
+ manifest.sub!(/(android:targetSdkVersion=').*?(')/) { "#$1L#$2" }
244
+ else
245
+ manifest.sub!(/(android:minSdkVersion=').*?(')/) { "#$1#{sdk_level}#$2" }
246
+ manifest.sub!(/(android:targetSdkVersion=').*?(')/) { "#$1#{sdk_level}#$2" }
247
+ end
248
+ # EMXIF
249
+
235
250
  if manifest != old_manifest
236
251
  puts "\nUpdating #{File.basename MANIFEST_FILE} with target from #{File.basename PROJECT_PROPS_FILE}\n\n"
237
252
  File.open(MANIFEST_FILE, 'w') { |f| f << manifest }
@@ -540,7 +555,7 @@ file APK_FILE => APK_DEPENDENCIES do |t|
540
555
  build_apk(t, false)
541
556
  end
542
557
 
543
- MINIMUM_DX_HEAP_SIZE = 2048
558
+ MINIMUM_DX_HEAP_SIZE = 3072
544
559
  task :patch_dex do
545
560
  new_dx_content = File.read(DX_FILENAME).dup
546
561
  xmx_pattern = ON_WINDOWS ? /^set defaultXmx=-Xmx(\d+)(M|m|G|g|T|t)/ : /^defaultMx="-Xmx(\d+)(M|m|G|g|T|t)"/
@@ -612,7 +627,7 @@ namespace :test do
612
627
  puts 'Running quick tests'
613
628
  install_retry_count = 0
614
629
  begin
615
- timeout 120 do
630
+ timeout 300 do
616
631
  sh "#{ANT_CMD} instrument install"
617
632
  end
618
633
  rescue TimeoutError
@@ -640,8 +655,11 @@ file BUNDLE_JAR => [GEM_FILE, GEM_LOCK_FILE] do
640
655
  next unless File.exists? GEM_FILE
641
656
  puts "Generating #{BUNDLE_JAR}"
642
657
  require 'bundler'
643
- # FIXME(uwe): Issue #547 https://github.com/ruboto/ruboto/issues/547
644
- if true || Gem::Version.new(Bundler::VERSION) <= Gem::Version.new('1.6.3')
658
+ if false
659
+ # FIXME(uwe): Issue #547 https://github.com/ruboto/ruboto/issues/547
660
+ # Bundler.settings[:platform] = Gem::Platform::DALVIK
661
+ sh "bundle install --gemfile #{GEM_FILE} --path=#{BUNDLE_PATH} --platform=dalvik#{sdk_level}"
662
+ else
645
663
  require 'bundler/vendored_thor'
646
664
 
647
665
  # Store original RubyGems/Bundler environment
@@ -682,9 +700,6 @@ file BUNDLE_JAR => [GEM_FILE, GEM_LOCK_FILE] do
682
700
  Gem.platforms = platforms
683
701
  ENV['GEM_HOME'] = env_home
684
702
  ENV['GEM_PATH'] = env_path
685
- else
686
- # Bundler.settings[:platform] = Gem::Platform::DALVIK
687
- sh "bundle install --gemfile #{GEM_FILE} --path=#{BUNDLE_PATH} --platform=dalvik#{sdk_level}"
688
703
  end
689
704
 
690
705
  gem_paths = Dir["#{BUNDLE_PATH}/gems"]
@@ -855,7 +870,9 @@ end
855
870
  # Methods
856
871
 
857
872
  def sdk_level
858
- File.read(PROJECT_PROPS_FILE).scan(/(?:target=android-)(\d+)/)[0][0].to_i
873
+ # FIXME(uwe): Remove special case 'L' when Android L is released.
874
+ level = File.read(PROJECT_PROPS_FILE).scan(/(?:target=android-)(\d+|L)/)[0][0].to_i
875
+ level == 0 ? 21 : level
859
876
  end
860
877
 
861
878
  def mark_update(time = Time.now)
@@ -974,7 +991,7 @@ def install_apk
974
991
  output = nil
975
992
  install_retry_count = 0
976
993
  begin
977
- timeout 120 do
994
+ timeout 300 do
978
995
  output = `adb install -r "#{APK_FILE}" 2>&1`
979
996
  end
980
997
  rescue Timeout::Error
@@ -1007,7 +1024,7 @@ def install_apk
1007
1024
  output = nil
1008
1025
  install_retry_count = 0
1009
1026
  begin
1010
- timeout 120 do
1027
+ timeout 300 do
1011
1028
  output = `adb install "#{APK_FILE}" 2>&1`
1012
1029
  end
1013
1030
  rescue Timeout::Error
@@ -1018,7 +1035,9 @@ def install_apk
1018
1035
  retry
1019
1036
  end
1020
1037
  puts 'Trying one final time to install the package:'
1038
+ install_start = Time.now
1021
1039
  output = `adb install "#{APK_FILE}" 2>&1`
1040
+ puts "Install took #{(Time.now - install_start).to_i}s."
1022
1041
  end
1023
1042
  puts output
1024
1043
  raise "Install failed (#{$?}) #{$1 ? "[#$1}]" : output}" if $? != 0 || output =~ failure_pattern || output !~ success_pattern
@@ -166,7 +166,7 @@ def remove_unneeded_parts_of_stdlib
166
166
  # Only affects JRuby 1.7.11, 1.7.12, and 9000 (until fixed).
167
167
  # FIXME(uwe): Remove when we stop supporting JRuby 1.7.11 and 1.7.12
168
168
  Dir['**/provider.rb'].each do |f|
169
- puts "Patching #{f}..."
169
+ print "patching #{f}..."
170
170
  File.write(f, File.read(f).sub(%r{require_relative 'provider/ffi'}, "# require_relative 'provider/ffi'"))
171
171
  end
172
172
  # EMXIF
@@ -7,7 +7,6 @@
7
7
  android:gravity="center_horizontal|center_vertical"
8
8
  >
9
9
  <ImageButton
10
- android:id="@+id/image"
11
10
  android:layout_width="fill_parent"
12
11
  android:layout_height="fill_parent"
13
12
  android:src="@drawable/get_ruboto_core"
@@ -15,7 +14,7 @@
15
14
  android:scaleType="fitCenter"
16
15
  android:onClick="getRubotoCore"
17
16
  />
18
- <TextView android:id="@+id/text"
17
+ <TextView android:id="@android:id/text1"
19
18
  android:layout_width="wrap_content"
20
19
  android:layout_height="wrap_content"
21
20
  android:text="Welcome to Ruboto! This is the first Ruboto application installed on this device. To continue, you need to install the Ruboto Core platform package. Click on the image above to go to the market and d\