Laurent Sansonetti
aee711688c
add support for Java class extensions: classes defined in .rb files can be extended in Java, by writing methods in a Foo.java file (where Foo is the name of the class) in a directory that contains .rb files (ex. ‘app/Foo.java’)
2014-10-28 19:40:43 +01:00
Laurent Sansonetti
02fb5ce2be
without this line, we will always rebuild classes.dex
2014-10-28 17:51:45 +01:00
Laurent Sansonetti
8c66814ae0
better message
2014-10-28 17:26:33 +01:00
Laurent Sansonetti
30fb3fe861
add app.services to let users expose android services
2014-10-26 22:12:39 +01:00
Laurent Sansonetti
6bac384407
when an exception is raised from a file init function and isn’t caught, print a better message to the user
2014-10-25 00:47:19 +02:00
Laurent Sansonetti
6b0a0176c1
rebuild payload.o if payload.c changed
2014-10-25 00:47:19 +02:00
Laurent Sansonetti
53e49c1443
add app.features to expose <uses-feature ...> elements to the manifest file, cleanup the XML generated code
2014-10-23 17:22:54 +02:00
Laurent Sansonetti
3318d87105
call Ruby init functions within an EH + pass the top-self reference
2014-10-20 12:29:07 +02:00
Eloy Durán
478472308c
[rake] Re-instate top-level clean task and refactor into XcodeConfig.
...
Related to:
* 646cbb1918
* bddc880f98
2014-10-17 12:55:57 +02:00
Laurent Sansonetti
8617f53d17
better init function names, using the sha1 of the full .bc path (sadly we can’t follow what we do for ios/osx as it would require bundling llvm-nm or another tool with the distribution)
2014-10-17 12:40:04 +02:00
Laurent Sansonetti
1749dd4317
unnecessary line
2014-10-17 12:38:10 +02:00
Laurent Sansonetti
bddc880f98
bring back “rake clean” task
2014-10-17 12:37:52 +02:00
Laurent Sansonetti
cd48fb034d
better message in case we can't retrieve the API version of the device
2014-10-17 12:05:44 +02:00
Laurent Sansonetti
00c9510d1f
generate java.lang.System.loadLibrary() instead of System.loadLibrary() because the later may not work all the time
2014-10-17 00:33:41 +02:00
Laurent Sansonetti
9d5e61262f
change app.api_version to return the latest available version except L (which is not stable), introduce app.target_api_version, api_version now maps to minSdkVersion and target_api_version to targetSdkVersion
2014-10-01 13:17:05 +02:00
Laurent Sansonetti
33b7e63372
add app.application_class that can be used to specify a custom Application class
2014-10-01 11:15:46 +02:00
Laurent Sansonetti
3185d47e69
kill the app if the rake task ends (^C)
2014-09-30 16:59:50 +02:00
Laurent Sansonetti
8d0525f494
add support for the R class (thanks to Mark for the patch)
2014-09-29 17:14:43 +01:00
Laurent Sansonetti
517d361894
“rake emulator” now requires a started AVD and will not attempt at creating one
2014-09-16 17:26:28 +09:00
Laurent Sansonetti
9aa2d644cd
pass kernel path to REPL, minor refactoring
2014-09-11 17:15:54 +02:00
Laurent Sansonetti
fec985a126
launch the REPL upon “rake device” (or “rake emulator” — haven’t tried that one thought)
2014-09-11 16:17:16 +02:00
Laurent Sansonetti
bcf2883943
pass environment mode and version number to the runtime, minor refactoring
2014-09-11 15:56:23 +02:00
Laurent Sansonetti
510aee6a4d
in development mode, include the INTERNET permission as it’s required for the REPL socket
2014-09-11 15:56:23 +02:00
Laurent Sansonetti
85a996e335
export super-less classes to Java (build system patch)
2014-08-24 17:42:39 +02:00
Laurent Sansonetti
ea82921b7e
when generating the .java code make sure we don’t export the same method twice (we used to do that in the compiler but it’s best to move this logic to the build system, since multiple ruby files can open the same Java class)
2014-08-24 16:05:26 +02:00
Laurent Sansonetti
21b9318ef8
add app.permissions’ a shortcut that allows uses-permission’ elements to be added to the manifest file
2014-08-22 19:34:21 +02:00
Laurent Sansonetti
70224dc851
make sure we use 'adb -d' since an emulator could be running at the same time
2014-08-14 18:22:26 -04:00
Laurent Sansonetti
8f5c3dce69
before installing an app, verify that the usb-connected device runs an API version higher or equal to the app's one
2014-08-09 21:23:24 +02:00
Laurent Sansonetti
3fe0821c88
Remove configChanges from the manifest.
...
Gives problems in older versions and also Google recommends using it as a last resort
"Using this attribute should be avoided and used only as a last resort."
http://developer.android.com/guide/topics/manifest/activity-element.html
Patch by Mark Villacampa.
2014-08-09 11:26:44 +02:00
Laurent Sansonetti
ee36b4b967
Use System.loadLibrary() to load the payload. This is what JNI sample apps use.
...
Line 64:
https://android.googlesource.com/platform/development/+/android-4.4.4_r2/ndk/samples/hello-jni/src/com/example/hellojni/HelloJni.java
This makes RubyMotion work on older Android versions (such as API 8).
Patch by Mark Villacampa.
2014-08-09 11:26:44 +02:00
Laurent Sansonetti
39c8890c08
JDK 7 requires explicitly setting this. Should work in JDK 6 too.
...
"Caution: As of JDK 7, the default signing algorithim has changed, requiring you to specify the signature and digest algorithims (-sigalg and -digestalg) when you sign an APK."
Google Cache:
http://webcache.googleusercontent.com/search?q=cache:OjyaP-Zoz-MJ:developer.android.com/tools/publishing/app-signing.html+&cd=1&hl=es&ct=clnk&client=safari
(Patch by Mark Villacampa)
2014-08-09 11:26:44 +02:00
Watson
9ff1dab9eb
fix zipalign path
2014-08-08 23:11:54 +09:00
Watson
ed5521ad56
[android] fix an error which /usr/bin/keytool causes if '~/.android' is not existed
...
This should fix the following error
/usr/bin/keytool -genkeypair -alias androiddebugkey -keypass android -keystore "/Users/watson/.android/debug.keystore" -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=ja_JP.UTF-8
keytool エラー: java.io.FileNotFoundException: /Users/watson/.android/debug.keystore (No such file or directory)
2014-08-01 12:40:14 +09:00
Laurent Sansonetti
51dc4dab9f
update path of zipalign tool
2014-06-27 19:11:14 +02:00
Laurent Sansonetti
6d662e4d21
re-generate classes.dex if one of the vendored jar is newer
2014-06-11 00:28:59 +02:00
Watson
591a616a68
build an app even if resources and assets directories does exists
...
This should fix the following error.
Because, now, android samples does not have resources and assets directories.
$ rake device
Compile ./app/main_activity.rb
Create ./build/Development-18/lib/armeabi/libpayload.so
Create ./build/Development-18/lib/armeabi/gdbserver
Create ./build/Development-18/lib/armeabi/gdb.setup
Create ./build/Development-18/AndroidManifest.xml
ERROR: resource directory './resources' does not exist
rake aborted!
2014-05-29 05:03:34 -07:00
Laurent Sansonetti
d2b5ec0bfc
fix rake start_avd’ task to honor the avd’ env variable which can be used to override the default AVD configuration that should be used
2014-05-27 09:56:35 -07:00
Laurent Sansonetti
bbe51897e7
add app.version_name, app.version_code, and app.version(code, name) to specify app versioning when generating the manifest file
2014-05-20 12:01:08 +02:00
Laurent Sansonetti
66f4c8cff8
add `rake release’ task which creates an apk build suitable for play store submissions, fix build to use a distinct directory for development/release build objects
2014-05-19 16:30:29 +02:00
Laurent Sansonetti
4549026078
damnit
2014-05-19 10:52:11 +02:00
Laurent Sansonetti
e89343c126
fix a bug where the ‘class_path’ local variable was shadowed
2014-05-19 10:47:22 +02:00
Laurent Sansonetti
ea4a041b8f
read extra packages paths from the manifest files, rebuild the R.java files if *any* resource file is newer than them
2014-05-19 10:41:21 +02:00
Laurent Sansonetti
04d11e1c99
fix app.vendor_project to accept a manifest’ key/value pair (when resources’ is provided), generate R.java files for the project’s resources + libraries’ resources
2014-05-19 10:22:05 +02:00
Laurent Sansonetti
1949f57c58
remove app.manifest_metadata, add app.manifest_entry() which can be used to provide any element at either the top-level element or ‘application’
2014-05-19 10:18:50 +02:00
Laurent Sansonetti
8b06cc055b
add app.logs_components which can be used to customize the components we will be logging messages from in the development terminal
2014-05-19 00:20:34 +02:00
Laurent Sansonetti
e67a6e4123
introduce app.vendor_project which receives a hash (mandatory, :jar key/value, optional, :resources key/value), fix build system to include 3rd-party resources directories into the apk
2014-05-19 00:20:34 +02:00
Laurent Sansonetti
1e235c909e
add app.manifest_metadata which can be used to provide <meta-data …> elements to the AndroidManifest.xml file
2014-05-19 00:20:34 +02:00
Laurent Sansonetti
8bf34a724a
add app.icon which must contain the name of an icon file in resources/drawable
2014-05-19 00:20:34 +02:00
Laurent Sansonetti
c629a10ddf
app.resources_dirs are now used for android resources, introduce app.assets_dirs to store raw assets (and it defaults to the ‘assets’ project directory)
2014-05-19 00:20:34 +02:00
Laurent Sansonetti
3426b6cfba
support for 3rd-party android libraries: the build system will vendor all .jar files that are inside the ‘vendor’ sub-directory, and also generate .bridgesupport metadata for them
2014-05-15 20:04:17 +02:00