Commit Graph

369 Commits

Author SHA1 Message Date
Andrew Grieve
3cd567dc95 Merge branch 'master' into 4.0.x (better auto-detect sdk) 2014-09-11 16:01:01 -04:00
Andrew Grieve
2f7ffa3636 CB-7511 Auto-detect android sdk when using stand-alone sdk installer 2014-09-11 15:37:22 -04:00
Ian Clelland
d99386ef1e Merge branch 'master' into 4.0.x 2014-09-11 15:12:31 -04:00
Ian Clelland
9ae3d2c074 CB-7512: Copy cordova.gradle file to project root on build 2014-09-11 15:12:07 -04:00
Ian Clelland
dd5a337a49 Merge branch 'master' into 4.0.x
Conflicts:
	framework/src/org/apache/cordova/CordovaActivity.java
2014-09-11 10:18:35 -04:00
Andrew Grieve
bf13fd48ce Use add --compact flag in check_reqs when listing targets. No functional change. 2014-09-10 12:44:17 -04:00
Andrew Grieve
3b99760a42 CB-7330 Don't run check_reqs for bin/create.
The create / update script doesn't require any dependencies, so we
shouldn't fail without them.
2014-09-10 12:44:17 -04:00
Ian Clelland
0e78dc35d8 CB-7512: Read android target from project.properties if possible 2014-09-10 11:39:29 -04:00
Ian Clelland
c8bbdb23de CB-7512: Determine SDK and build tools version dynamcally at build time 2014-09-10 10:57:43 -04:00
Ian Clelland
7ee8117186 CB-7463: Adding licence to project template gradle file 2014-09-10 10:54:21 -04:00
Andrew Grieve
8237c41143 CB-7511 Auto-detect Android SDK when Android Studio is installed 2014-09-10 10:14:38 -04:00
Steven Gill
91cf78f183 Set VERSION to 3.7.0-dev (via coho) 2014-08-29 16:34:12 -07:00
Ian Clelland
0b6b068097 CB-3445: Allow build and run scripts to select APK by architecture 2014-08-29 16:00:54 -04:00
Ian Clelland
4bc2051f44 CB-3445: Allow build and run scripts to select APK by architecture 2014-08-29 16:00:13 -04:00
Ian Clelland
623b2306ca CB-3445: Add environment variable 'BUILD_MULTIPLE_APKS' for splitting APKs based on architecture 2014-08-28 16:18:51 -04:00
Ian Clelland
34dde53506 CB-3445: Add environment variable 'BUILD_MULTIPLE_APKS' for splitting APKs based on architecture 2014-08-28 16:18:02 -04:00
Ian Clelland
7a09182446 CB-3445: Ensure that JAR files in libs directory are included 2014-08-28 13:17:26 -04:00
Ian Clelland
233e513860 CB-3445: Ensure that JAR files in libs directory are included 2014-08-28 11:26:58 -04:00
Ian Clelland
7caa96abcd Fix previous merges
Build scripts (create and build) were mangled somewhat by the previous
merge commits. This resets them to (almost) exactly the same state as
the 3.6.x (master) branch.

Conflicts:
	bin/lib/create.js
2014-08-20 11:45:35 -04:00
Ian Clelland
b2776269cf Merge branch 'master' into 4.0.x (Gradle library dependencies) 2014-08-20 11:43:58 -04:00
Ian Clelland
b6c5a5fc9a CB-3445: Read project.properties to configure gradle libraries 2014-08-20 11:42:04 -04:00
Refael Ackermann
94943a9a84 CB-7325 Fix error message in android_sdk_version.js when missing SDK on windows
github: close #113
2014-08-20 11:20:02 -04:00
Andrew Grieve
4c1942e3fe Merge branch 'master' into 4.0.x (build & create script updates)
Conflicts:
	bin/lib/check_reqs.js
	bin/lib/create.js
	bin/node_modules/which/package.json
	bin/templates/cordova/lib/build.js
2014-08-19 12:02:36 -04:00
Andrew Grieve
71e72f215d CB-7335 Add a .gitignore to android project template 2014-08-19 11:59:18 -04:00
Andrew Grieve
58cdfd86d0 CB-7330 Fix dangling function call in last commit (broke gradle builds) 2014-08-19 11:53:53 -04:00
Andrew Grieve
dfa66b9dd4 CB-7330 Don't run "android update" during creation
Instead, have the build script copy do the equivalent logic on each
build.

Advantages:
- Scripts run much faster
- No more duplicate CordovaLib entries in project.properties
- Building is more independent from create/update script (more robust)
2014-08-18 23:24:29 -04:00
Andrew Grieve
d56ea25816 CB-3445 Add gradle support clean command (plus some code cleanup)
* Don't run ant clean for gradle ever
* Don't set sdk.dir since ANDROID_HOME is not always set
* Don't export builders
2014-08-18 16:19:40 -04:00
Andrew Grieve
c91b272648 CB-7044 Fix typo in prev commit causing check_reqs to always fail. 2014-08-18 15:26:52 -04:00
Andrew Grieve
ca8bb75b40 CB-3445 Copy gradle wrapper in build instead of create
This should play nicer with updates to the android SDK.
2014-08-18 14:51:40 -04:00
Andrew Grieve
36eab713a1 CB-3445 Add .gradle template files for "update" as well as "create" 2014-08-18 14:50:27 -04:00
Andrew Grieve
7133576fe9 CB-7044 Add JAVA_HOME when not set. Be stricter about ANDROID_HOME
Also switches to using the which module over shelljs.which (better
support for .bat files)
2014-08-18 14:45:23 -04:00
Andrew Grieve
effffcba1d CB-3445 Speed up gradle building (incremental builds go from 10s -> 1.5s for me)
Biggest win is disabling the linter.
2014-08-18 14:17:34 -04:00
Ian Clelland
a91bd095b0 CB-3445: android: Copy Gradle wrapper from Android SDK rather than bundling a JAR 2014-08-18 09:48:31 -04:00
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
Andrew Grieve
e2b3f76a10 Merge branch 'master' into 4.0.x (PluginEntry refactor)
Conflicts:
	framework/src/org/apache/cordova/PluginEntry.java
	framework/src/org/apache/cordova/PluginManager.java
	test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java
2014-07-14 14:18:10 -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
9c5e340fb8 Merge branch 'master' into 4.0.x (App plugin from config.xml -> code)
Conflicts:
	bin/templates/cordova/defaults.xml
	framework/res/xml/config.xml
	framework/src/org/apache/cordova/CordovaWebView.java
2014-07-08 11:52:44 -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
1571b26a65 Merge branch 'master' into 4.0.x (ConfigXmlParser + two-phase init)
Conflicts:
	framework/src/org/apache/cordova/CordovaActivity.java
	framework/src/org/apache/cordova/CordovaChromeClient.java
	framework/src/org/apache/cordova/CordovaWebView.java
	framework/src/org/apache/cordova/CordovaWebViewClient.java
	framework/src/org/apache/cordova/PluginManager.java
2014-07-07 16:23:51 -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
4ce5123a12 Merge branch 'master' into 4.0.x (bindButton changes)
Conflicts:
	framework/src/org/apache/cordova/CordovaWebView.java
	package.json
2014-06-24 15:22:27 -04:00
Ian Clelland
4352456129 CB-5971: Fix package / project validation 2014-06-24 14:05:56 -04:00
Ian Clelland
bb141a70e8 CB-5971: Add unit tests to cordova-android 2014-06-24 14:05:56 -04:00