assets/rakelib/ruboto.rake in ruboto-1.4.0 vs assets/rakelib/ruboto.rake in ruboto-1.4.1
- old
+ new
@@ -553,11 +553,14 @@
file APK_FILE => APK_DEPENDENCIES do |t|
build_apk(t, false)
end
-MINIMUM_DX_HEAP_SIZE = (ENV['DX_HEAP_SIZE'] && ENV['DX_HEAP_SIZE'].to_i) || 4096
+# FIXME(uwe): Simplify when we stop supporting 32-bit development environments
+DEFAULT_MIN_DX_HEAP_SIZE = RbConfig::CONFIG['host_cpu'] =~ /86/ ? 3072 : 4096
+# EMXIF
+MINIMUM_DX_HEAP_SIZE = (ENV['DX_HEAP_SIZE'] && ENV['DX_HEAP_SIZE'].to_i) || DEFAULT_MIN_DX_HEAP_SIZE
task :patch_dex do
DX_FILENAMES.each do |dx_filename|
new_dx_content = File.read(dx_filename).dup
xmx_pattern = ON_WINDOWS ? /^set defaultXmx=-Xmx(\d+)(M|m|G|g|T|t)/ : /^defaultMx="-Xmx(\d+)(M|m|G|g|T|t)"/
if new_dx_content =~ xmx_pattern &&
@@ -890,24 +893,24 @@
logcat_cmd = "adb logcat ActivityManager #{filter}" # we always need ActivityManager logging to catch activity start
puts "--- starting logcat: #{logcat_cmd}"
IO.popen logcat_cmd do |logcat|
puts "--- waiting for activity #{package}/.#{main_activity} ..."
activity_started = false
- started_regex_android_5_1 = Regexp.new "^\\I/ActivityManager.+Start proc (?<pid>\\d+):#{package}/.+ for activity #{package}/\\.#{main_activity}"
- started_regex = Regexp.new "^\\I/ActivityManager.+Start proc #{package} for activity #{package}/\\.#{main_activity}: pid=(?<pid>\\d+)"
- restarted_regex = Regexp.new "^\\I/ActivityManager.+START u0 {cmp=#{package}/org.ruboto.RubotoActivity.+} from pid (?<pid>\\d+)"
- related_regex = Regexp.new "#{package}|#{main_activity}"
+ started_regex = %r"I.ActivityManager.+Start proc #{package} for activity #{package}/\.#{main_activity}: pid=(?<pid>\d+)"
+ started_regex_android_5_1 = %r"I.ActivityManager.+Start proc (?<pid>\d+):#{package}/.+ for activity #{package}/\.#{main_activity}"
+ restarted_regex = %r"I.ActivityManager.+START u0 {cmp=#{package}/org.ruboto.RubotoActivity.+} from pid (?<pid>\d+)"
+ related_regex = /#{package}|#{main_activity}/
android_4_2_noise_regex = /Unexpected value from nativeGetEnabledTags/
pid_regex = nil
logcat.each_line do |line|
line.force_encoding(Encoding::BINARY)
- # FIXME(uwe): Remove when we stop supporting Ancdroid 4.2
+ # FIXME(uwe): Remove when we stop supporting Android 4.2
next if line =~ android_4_2_noise_regex
# EMXIF
if (activity_start_match = started_regex.match(line) || started_regex_android_5_1.match(line) || restarted_regex.match(line))
activity_started = true
pid = activity_start_match[:pid]
- pid_regex = Regexp.new "\\( *#{pid}\\): "
+ pid_regex = /\( *#{pid}\): /
puts "--- activity PID=#{pid}"
end
if activity_started && (line =~ pid_regex || line =~ related_regex)
puts "#{Time.now.strftime('%Y%m%d %H%M%S.%6N')} #{line}"
end