Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update to ruboto 0.10 dev

  • Loading branch information...
commit b0e057cde928ccd6eab829a63a60503e7eedecc9 1 parent 401afa0
@rscottm rscottm authored
View
32 AndroidManifest.xml
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
-<manifest xmlns:android='http://schemas.android.com/apk/res/android' package='org.ruboto.irb' android:installLocation='preferExternal' android:versionCode='12' android:versionName='@string/version_name'>
- <application android:hardwareAccelerated='true' android:label='@string/app_name' android:icon='@drawable/icon' android:largeHeap='true'>
- <activity android:hardwareAccelerated='false' android:label='@string/app_name' android:windowSoftInputMode='adjustResize' android:alwaysRetainTaskState='true' android:configChanges='orientation|screenSize' android:name='IRB'>
+<manifest package='org.ruboto.irb' android:installLocation='preferExternal' android:versionCode='12' android:versionName='@string/version_name' xmlns:android='http://schemas.android.com/apk/res/android'>
+ <application android:hardwareAccelerated='true' android:icon='@drawable/icon' android:label='@string/app_name' android:largeHeap='true'>
+ <activity android:alwaysRetainTaskState='true' android:configChanges='orientation|screenSize' android:hardwareAccelerated='false' android:label='@string/app_name' android:name='IRB' android:windowSoftInputMode='adjustResize'>
<intent-filter>
<action android:name='android.intent.action.MAIN'/>
<category android:name='android.intent.category.LAUNCHER'/>
@@ -28,24 +28,24 @@
</intent-filter>
</activity>
<activity android:alwaysRetainTaskState='true' android:configChanges='orientation|screenSize' android:name='org.ruboto.RubotoActivity'/>
- <activity android:theme='@android:style/Theme.Dialog' android:configChanges='orientation|screenSize' android:name='org.ruboto.RubotoDialog'/>
+ <activity android:configChanges='orientation|screenSize' android:name='org.ruboto.RubotoDialog' android:theme='@android:style/Theme.Dialog'/>
<activity android:name='org.ruboto.RubotoPreferenceActivity'/>
<activity android:configChanges='orientation|screenSize' android:name='net.android.facebook.TestConnect'/>
<activity android:configChanges='orientation|screenSize' android:name='net.android.facebook.TestPost'/>
<service android:exported='false' android:name='org.ruboto.RubotoService'/>
</application>
- <uses-sdk android:targetSdkVersion='13' android:minSdkVersion='7'/>
- <supports-screens android:xlargeScreens='true' android:largeScreens='true' android:normalScreens='true' android:anyDensity='true' android:smallScreens='true'/>
- <uses-feature android:required='false' android:name='android.hardware.telephony'/>
- <uses-feature android:required='false' android:name='android.hardware.touchscreen'/>
- <uses-feature android:required='false' android:name='android.hardware.location'/>
- <uses-feature android:required='false' android:name='android.hardware.location.gps'/>
- <uses-feature android:required='false' android:name='android.hardware.location.network'/>
- <uses-feature android:required='false' android:name='android.hardware.wifi'/>
- <uses-feature android:required='false' android:name='android.hardware.microphone'/>
- <uses-feature android:required='false' android:name='android.hardware.camera'/>
- <uses-feature android:required='false' android:name='android.hardware.camera.autofocus'/>
- <uses-feature android:required='false' android:name='android.hardware.bluetooth'/>
+ <uses-sdk android:minSdkVersion='7' android:targetSdkVersion='13'/>
+ <supports-screens android:anyDensity='true' android:largeScreens='true' android:normalScreens='true' android:smallScreens='true' android:xlargeScreens='true'/>
+ <uses-feature android:name='android.hardware.telephony' android:required='false'/>
+ <uses-feature android:name='android.hardware.touchscreen' android:required='false'/>
+ <uses-feature android:name='android.hardware.location' android:required='false'/>
+ <uses-feature android:name='android.hardware.location.gps' android:required='false'/>
+ <uses-feature android:name='android.hardware.location.network' android:required='false'/>
+ <uses-feature android:name='android.hardware.wifi' android:required='false'/>
+ <uses-feature android:name='android.hardware.microphone' android:required='false'/>
+ <uses-feature android:name='android.hardware.camera' android:required='false'/>
+ <uses-feature android:name='android.hardware.camera.autofocus' android:required='false'/>
+ <uses-feature android:name='android.hardware.bluetooth' android:required='false'/>
<uses-permission android:name='android.permission.WRITE_EXTERNAL_STORAGE'/>
<uses-permission android:name='com.android.launcher.permission.INSTALL_SHORTCUT'/>
<uses-permission android:name='android.permission.INTERNET'/>
View
18 rakelib/ruboto.rake
@@ -1,4 +1,8 @@
require 'rbconfig'
+require 'rubygems'
+require 'time'
+require 'rake/clean'
+require 'rexml/document'
ANT_CMD = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw/i) ? "ant.bat" : "ant"
@@ -7,7 +11,12 @@ if `#{ANT_CMD} -version` !~ /version (\d+)\.(\d+)\.(\d+)/ || $1.to_i < 1 || ($1.
exit 1
end
-require 'time'
+adb_version_str = `adb version`
+(puts "Android SDK platform tools not in PATH (adb command not found).";exit 1) unless $? == 0
+(puts "Unrecognized adb version: #$1";exit 1) unless adb_version_str =~ /Android Debug Bridge version (\d+\.\d+\.\d+)/
+(puts "adb version 1.0.31 or later required. Version found: #$1";exit 1) unless Gem::Version.new($1) >= Gem::Version.new('1.0.31')
+adb_path = `which adb`
+ENV['ANDROID_HOME'] ||= File.dirname(File.dirname(adb_path)) if $? == 0
def manifest() @manifest ||= REXML::Document.new(File.read(MANIFEST_FILE)) end
def package() manifest.root.attribute('package') end
@@ -15,9 +24,6 @@ def build_project_name() @build_project_name ||= REXML::Document.new(File.read('
def scripts_path() @sdcard_path ||= "/mnt/sdcard/Android/data/#{package}/files/scripts" end
def app_files_path() @app_files_path ||= "/data/data/#{package}/files" end
-require 'rake/clean'
-require 'rexml/document'
-
PROJECT_DIR = File.expand_path('..', File.dirname(__FILE__))
UPDATE_MARKER_FILE = File.join(PROJECT_DIR, 'bin', 'LAST_UPDATE')
BUNDLE_JAR = File.expand_path 'libs/bundle.jar'
@@ -38,7 +44,7 @@ APK_DEPENDENCIES = [MANIFEST_FILE, RUBOTO_CONFIG_FILE, BUNDLE_JAR] + JRUBY_JAR
KEYSTORE_FILE = (key_store = File.readlines('ant.properties').grep(/^key.store=/).first) ? File.expand_path(key_store.chomp.sub(/^key.store=/, '').sub('${user.home}', '~')) : "#{build_project_name}.keystore"
KEYSTORE_ALIAS = (key_alias = File.readlines('ant.properties').grep(/^key.alias=/).first) ? key_alias.chomp.sub(/^key.alias=/, '') : build_project_name
-CLEAN.include('bin')
+CLEAN.include('bin', 'gen')
task :default => :debug
@@ -98,6 +104,8 @@ file RELEASE_APK_FILE => [KEYSTORE_FILE] + APK_DEPENDENCIES do |t|
end
desc 'Create a keystore for signing the release APK'
+task :keystore => KEYSTORE_FILE
+
file KEYSTORE_FILE do
unless File.read('ant.properties') =~ /^key.store=/
File.open('ant.properties', 'a'){|f| f << "\nkey.store=#{KEYSTORE_FILE}\n"}
View
14 src/org/ruboto/JRubyAdapter.java
@@ -262,6 +262,11 @@ public static synchronized boolean setUpJRuby(Context appContext, PrintStream ou
System.setProperty("jruby.ji.proxyClassFactory", "org.ruboto.DalvikProxyClassFactory");
System.setProperty("jruby.class.cache.path", appContext.getDir("dex", 0).getAbsolutePath());
+ // Workaround for bug in Android 2.2
+ // http://code.google.com/p/android/issues/detail?id=9431
+ // System.setProperty("java.net.preferIPv4Stack", "true");
+ // System.setProperty("java.net.preferIPv6Addresses", "false");
+
ClassLoader classLoader;
Class<?> scriptingContainerClass;
String apkName = null;
@@ -439,14 +444,15 @@ private static void handleInitException(Exception e) {
static void printStackTrace(Throwable t) {
// TODO(uwe): Simplify this when Issue #144 is resolved
- try {
- t.printStackTrace(output);
- } catch (NullPointerException npe) {
+ // TODO(scott): printStackTrace is causing too many problems
+ //try {
+ // t.printStackTrace(output);
+ //} catch (NullPointerException npe) {
// TODO(uwe): printStackTrace should not fail
for (java.lang.StackTraceElement ste : t.getStackTrace()) {
output.append(ste.toString() + "\n");
}
- }
+ //}
}
private static String scriptsDirName(Context context) {
View
2  test/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android='http://schemas.android.com/apk/res/android' package='org.ruboto.irb.tests' android:versionCode='1' android:versionName='1.0'>
+<manifest package='org.ruboto.irb.tests' android:versionCode='1' android:versionName='1.0' xmlns:android='http://schemas.android.com/apk/res/android'>
<!-- We add an application tag here just so that we can indicate that
this package needs to link against the android.test library,
which is needed when building test cases. -->
Please sign in to comment.
Something went wrong with that request. Please try again.