Commit Graph

2630 Commits

Author SHA1 Message Date
Ian Clelland
fd6a1e5ed0 CB-3445: Add which to checked-in node_modules 2014-08-18 09:48:31 -04:00
Ian Clelland
7d6ac87033 CB-3445: Add option to build and install with gradle
This gives build/cordova two new command-line arguments: --ant and
--gradle, and will select the build type from those. As a fallback
for the Cordova CLI, the environment variable ANDROID_BUILD can also be
used, set to either "ant" or "gradle".

The default is currently "ant", but it is intended for this to change in
the future.
2014-08-18 09:48:31 -04:00
Ian Clelland
8aa813b862 CB-3445: Add an initial set of Gradle build scripts
These scripts will build an android project, in debug and release mode.
They also support additional library projects, such as Crosswalk, being
added to libraries.gradle (and settings.gradle). A flag can be set in
libraries.gradle to enable multi-architecture builds.
2014-08-18 09:48:31 -04:00
Andrew Grieve
95aa5c9f1c CB-7321 Don't require ant for create script 2014-08-15 13:58:53 -04:00
Andrew Grieve
4319447cb5 CB-7044, CB-7299 Fix up PATH problems when possible.
Uses heuristics:
- Adds javac to PATH based on default install paths on Windows
- Adds javac to PATH based on JAVA_HOME
- Adds android and adb to PATH based on ANDROID_HOME
- Sets ANDROID_HOME based on location of "android"
2014-08-15 13:46:20 -04:00
Joe Bowser
50ea162251 Change in test's AndroidManifest.xml needed for the test to run properly. Forgot the manifest. 2014-08-14 14:30:31 -07:00
Joe Bowser
9c239804d3 Change in test's AndroidManifest.xml needed for the test to run properly 2014-08-14 14:29:54 -07:00
Joe Bowser
320e31bb10 Adding tests related to 3.5.1 2014-08-12 11:09:53 -07:00
Andrew Grieve
41125ea1e2 CB-7261 Fix setNativeToJsBridgeMode sometimes crashing when switching to ONLINE_EVENT 2014-08-07 16:18:56 -04:00
Martin Bektchiev
73219bf2d2 CB-7265 Fix crash when navigating to custom protocol (introduced in 3.5.1)
Conflicts:
	framework/src/org/apache/cordova/CordovaUriHelper.java

Github: close #111
2014-08-07 09:58:40 -04:00
Ian Clelland
d6eb723b7f Filter out non-launchable intents 2014-08-06 09:55:03 -04:00
Ian Clelland
993d73762c Handle unsupported protocol errors in webview better 2014-08-06 09:55:03 -04:00
Joe Bowser
48b51c451a CB-7238: I should have collapsed this, but Config.init() must go before the creation of CordovaWebView 2014-07-31 09:23:14 -07:00
Joe Bowser
3d191d5884 CB-7238: Minor band-aid to get tests running again, this has to go away before 3.6.0 is released, since this is an API change. 2014-07-31 08:17:31 -07:00
Ian Clelland
955133f173 Extend whitelist to handle URLs without // chars 2014-07-31 08:11:40 -07:00
Andrey Kurdyumov
c2cafb4b45 CB-7172 Force window to have focus after resume
Workaround for some devices (Samsung Galaxy Note 3 at least)

github: close #108
2014-07-22 22:33:53 -04:00
Jan Velecký
67f474ef42 CB-7159 Set background color of webView as well as its parent
github: close #109, close #110
2014-07-21 15:46:23 -04:00
Andrew Grieve
cd6c0e1de9 CB-7018 Fix setButtonPlumbedToJs never un-listening 2014-07-18 13:46:29 -04:00
Andrew Grieve
92be0033a8 Undeprecate some just-deprecated symbols in PluginManager.
Forgot about custom engines again :(
2014-07-14 14:28:27 -04:00
Andrew Grieve
b934c1be6a @Deprecate methods of PluginManager that were never meant to be public 2014-07-14 14:10:19 -04:00
Andrew Grieve
145b50a320 Move plugin instantiation and instance storing logic PluginEntry->PluginManager
Instantiation and storing of the instance should be owned privately by
PluginManager, not exposed via an unprotected public API. That said,
this refactoring does not make any breaking changes to the public API,
except for removing the createPlugin call in PluginEntry, which should
not be called by anyone other than PluginManager anyway.
2014-07-14 14:08:27 -04:00
Andrew Grieve
a33cdc9c7b Fix broken unit test due to missing Config.init() call 2014-07-14 14:06:47 -04:00
Matt Ray
62101e85ff Update to check for Google Glass APIs
This prevents the 'cordova build android' process from blowing up on this step if you assign the GDK as the target and want to rebuild via the CLI.

close #100
2014-07-14 10:30:23 -04:00
Eion Robb
0a3714e5e0 Fix for android not being in PATH check on Windows
close #103
2014-07-14 10:28:27 -04:00
Ankit Jain
86a2830d75 Displaying error when regex does not match.
On my ubuntu when `android` is not found typical output is:

```
   /bin/sh: 1: android: not found
```
close #104
2014-07-14 10:28:13 -04:00
Andrew Grieve
9300e97d2b Fix broken compile due to previous commit :( 2014-07-10 15:14:39 -04:00
Andrew Grieve
3792f75281 Tweak CordovaPlugin.initialize method to be less deprecated.
Thinking here is that we need a while for both initialize and
pluginInitialize to exist before plugin authors would bother not using
the deprecated one anyways. Really, no harm in keeping both for some
time.
2014-07-10 15:03:53 -04:00
Andrew Grieve
a14c794255 Un-deprecate CordovaActivity.init() - it's needed to tweak prefs in onCreate 2014-07-10 11:36:20 -04:00
Andrew Grieve
aef96e95e8 Tweak log messages in CordovaBridge with bridgeSecret is wrong 2014-07-10 11:36:20 -04:00
Andrew Grieve
cc860804f6 Backport CordovaBridge from 4.0.x -> master 2014-07-10 10:43:37 -04:00
Andrew Grieve
d8a19b5565 Update unit tests to not use most deprecated things (e.g. DroidGap) 2014-07-10 10:23:44 -04:00
Andrew Grieve
1c5b5e2ce6 Add non-String overloades for CordovaPreferences.set() 2014-07-10 10:23:26 -04:00
Andrew Grieve
2f24e42dc1 Make CordovaWebview resilient to init() not being called (for backwards-compatibility)
This can happen when apps are not utilizing CordovaActivity and instead
creating their own CordovaWebView.
2014-07-09 21:08:29 -04:00
Andrew Grieve
0c12aa163e Add node_module licenses to LICENSE 2014-07-09 16:08:18 -04:00
Andrew Grieve
ec47274fbd Update cordova.js snapshot to work with bridge changes 2014-07-09 13:31:44 -04:00
Andrew Grieve
04ccb06e3f Provide CordovaPlugin with CordovaPreferences. Add new Plugin.initialize()
This adds CordovaPlugin.initialize() (no args) and deprecates
CordovaPlugin.initialize(app, webView). This will allow us to refactor
more easily by using the package-private privateInitialize() to set
fields.
2014-07-08 14:26:21 -04:00
Andrew Grieve
d31ee20ba5 Convert usages of Config.* to use the non-static versions 2014-07-08 14:11:14 -04:00
Andrew Grieve
9b25d45b93 Change getProperty -> prefs.get* within CordovaActivity 2014-07-08 14:08:15 -04:00
Andrew Grieve
d51abdd73e Make CordovaUriHelper class package-private 2014-07-08 12:05:41 -04:00
Andrew Grieve
9ea8b2237a Fix PluginManager.setPluginEntries not removing old entries 2014-07-08 11:54:38 -04:00
Andrew Grieve
e86c2e5970 Move registration of App plugin from config.xml -> code
Less fragile this way.
2014-07-08 11:47:26 -04:00
Andrew Grieve
caeb86843d Make setWebViewClient an override instead of an overload. Delete Location-change JS->Native bridge mode (missed some of it). 2014-07-07 16:31:29 -04:00
Andrew Grieve
0f15608175 CB-4404 Revert setting android:windowSoftInputMode to "adjustPan"
"adjustResize" is what the value has been set to for the longest time (due to it
being in the wrong place in the manifest). "adjustResize" is a better default value anyways.
2014-07-07 13:07:51 -04:00
Andrew Grieve
705991e5b0 Refactor: Use ConfigXmlParser in activity. Adds CordovaWebView.init()
This does subtly change the API surface due to CordovaWebView.init(),
but only minimally, and is backwards compatibly with the default
generated projects from prior versions.
2014-07-04 16:32:09 -04:00
Andrew Grieve
b636874bd9 Deprecate some convenience methods on CordovaActivity
They don't add much convenience and the file is too big already.
2014-07-04 16:31:19 -04:00
Andrew Grieve
965e4e9b19 Fix CordovaPreferences not correctly parsing hex values (valueOf->decode) 2014-07-04 16:27:16 -04:00
Andrew Grieve
af77977fda Refactor: Move url-filter information into PluginEntry. 2014-07-04 14:53:00 -04:00
Andrew Grieve
e74baf188f Don't re-parse config.xml in onResume.
There shouldn't be any need to.
2014-07-04 12:19:28 -04:00
Andrew Grieve
663a71255f Move handling of Fullscreen preference to CordovaActivity
Makes more sense here since that's where the other FullScreen related
changes are.
2014-07-04 12:11:19 -04:00
Andrew Grieve
79aa3e159d Delete dead code from CordovaActivity 2014-07-04 11:46:03 -04:00