mirror of
https://github.com/apache/cordova-android.git
synced 2026-01-30 00:05:28 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
355aae7b4b | ||
|
|
5b4524ae12 | ||
|
|
33ac5c20b5 | ||
|
|
3ac3688d8c |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -40,6 +40,7 @@ Desktop.ini
|
||||
*.iml
|
||||
.idea
|
||||
npm-debug.log
|
||||
/framework/build
|
||||
node_modules/jshint
|
||||
node_modules/promise-matchers
|
||||
node_modules/jasmine-node
|
||||
|
||||
@@ -4,4 +4,3 @@ gen
|
||||
proguard-project.txt
|
||||
spec
|
||||
appveyor.yml
|
||||
framework/build
|
||||
|
||||
@@ -8,7 +8,7 @@ before_install:
|
||||
install:
|
||||
- npm install
|
||||
- npm install -g codecov
|
||||
- echo y | android update sdk -u --filter android-22,android-23,android-24,android-25
|
||||
- echo y | android update sdk -u --filter android-22,android-23,android-24
|
||||
android:
|
||||
components:
|
||||
- tools
|
||||
|
||||
@@ -20,23 +20,6 @@
|
||||
-->
|
||||
## Release Notes for Cordova (Android) ##
|
||||
|
||||
### 6.1.1 (Jan 03, 2017)
|
||||
* [CB-12159](https://issues.apache.org/jira/browse/CB-12159) **Android** Keystore password prompt won't show up
|
||||
* [CB-12169](https://issues.apache.org/jira/browse/CB-12169) Check for build directory before running a clean
|
||||
* Fixed `AndroidStudio` tests to actually run, removed `app/src/main/assets/` as a requirement and added `app/src/main/res` instead, added placeholder for `build/` folder, Removed dupe `gitignore`
|
||||
|
||||
### 6.1.0 (Nov 02, 2016)
|
||||
* [CB-12108](https://issues.apache.org/jira/browse/CB-12108) Updating gradle files to work with the latest version of Android Studio
|
||||
* [CB-12102](https://issues.apache.org/jira/browse/CB-12102) Bump travis to build to API 25
|
||||
* Bumping up the version
|
||||
* [CB-12101](https://issues.apache.org/jira/browse/CB-12101) Fix so that CLI builds don't conflict with Android Studio builds
|
||||
* [CB-12077](https://issues.apache.org/jira/browse/CB-12077) Fix paths for Android icons/splashscreens
|
||||
* added framework/build to .ratignore
|
||||
* Fix for broken testUrl test
|
||||
* Last minute change of test targets
|
||||
* Update JS snapshot to version 6.1.0-dev (via coho)
|
||||
* Set VERSION to 6.1.0-dev (via coho)
|
||||
|
||||
### 6.0.0 (Oct 20, 2016)
|
||||
|
||||
This release adds significant functionality, and also introduces a number
|
||||
@@ -56,31 +39,31 @@ Changes For Third-Party WebView Developers:
|
||||
|
||||
#### Curated Changes from the Git Commit Logs ####
|
||||
* Updating the gradle build for test to use the latest
|
||||
* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Fixing syncronous file check and future-proofing the JS for Travis
|
||||
* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Reading files to check for CordovaLib dependency, if so, we exclude CordovaLib to be safe
|
||||
* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Plugin build script for dependencies without a gradle file
|
||||
* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) The GradleBuidler can tell the difference between a Cordova Plugin Framework and a regular framework based on the name
|
||||
* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Fix to deal with custom frameworks with their own Gradle configuration
|
||||
* [CB-12003](https://issues.apache.org/jira/browse/CB-12003) updated node_modules
|
||||
* [CB-11771](https://issues.apache.org/jira/browse/CB-11771) Deep symlink directories to target project instead of linking the directory itself
|
||||
* [CB-11880](https://issues.apache.org/jira/browse/CB-11880) android: Fail-safe for cordova.exec()
|
||||
* [CB-11999](https://issues.apache.org/jira/browse/CB-11999) add message, catch exception if require fails
|
||||
* CB-11083: Fixing syncronous file check and future-proofing the JS for Travis
|
||||
* CB-11083: Reading files to check for CordovaLib dependency, if so, we exclude CordovaLib to be safe
|
||||
* CB-11083: Plugin build script for dependencies without a gradle file
|
||||
* CB-11083: The GradleBuidler can tell the difference between a Cordova Plugin Framework and a regular framework based on the name
|
||||
* CB-11083 Fix to deal with custom frameworks with their own Gradle configuration
|
||||
* CB-12003 updated node_modules
|
||||
* CB-11771 Deep symlink directories to target project instead of linking the directory itself
|
||||
* CB-11880 android: Fail-safe for cordova.exec()
|
||||
* CB-11999 add message, catch exception if require fails
|
||||
* fix issue with app_name containing apostrophes
|
||||
* [CB-8722](https://issues.apache.org/jira/browse/CB-8722) - Move icons from drawable to mipmap
|
||||
* [CB-11964](https://issues.apache.org/jira/browse/CB-11964) Call clean after plugin install and mock it in tests
|
||||
* CB-8722 - Move icons from drawable to mipmap
|
||||
* CB-11964 Call clean after plugin install and mock it in tests
|
||||
* Did a try/catch to deal with the unit tests vs actual project environment, code duplication is needed because of builderEnv
|
||||
* [CB-11964](https://issues.apache.org/jira/browse/CB-11964) Do a clean when installing a plugin to et around the bug
|
||||
* [CB-11921](https://issues.apache.org/jira/browse/CB-11921) - Add github pull request template
|
||||
* [CB-11935](https://issues.apache.org/jira/browse/CB-11935) Does a best-effort attempt to pause any processing that can be paused safely, such as animations and geolocation.
|
||||
* [CB-11640](https://issues.apache.org/jira/browse/CB-11640) Fixing check_reqs.js so it actually works
|
||||
* [CB-11640](https://issues.apache.org/jira/browse/CB-11640) Changing requirements check to ask for Java 8
|
||||
* [CB-11869](https://issues.apache.org/jira/browse/CB-11869) Fix cordova-js android exec tests
|
||||
* [CB-11907](https://issues.apache.org/jira/browse/CB-11907) Bumping Gradle to work with Android Studio 2.2 and the Android Gradle Plugin
|
||||
* CB-11964: Do a clean when installing a plugin to et around the bug
|
||||
* CB-11921 - Add github pull request template
|
||||
* CB-11935 Does a best-effort attempt to pause any processing that can be paused safely, such as animations and geolocation.
|
||||
* CB-11640: Fixing check_reqs.js so it actually works
|
||||
* CB-11640: Changing requirements check to ask for Java 8
|
||||
* CB-11869 Fix cordova-js android exec tests
|
||||
* CB-11907: Bumping Gradle to work with Android Studio 2.2 and the Android Gradle Plugin
|
||||
* Enable background start of Cordova Android apps
|
||||
* fixing jshint issues
|
||||
* replace Integer.parseInt with BigInteger so that you can use longer Android version codes
|
||||
* [CB-11828](https://issues.apache.org/jira/browse/CB-11828) Adding dirty userAgent checking to see if we're running Jellybean or not for bridge modes
|
||||
* [CB-11828](https://issues.apache.org/jira/browse/CB-11828) Switching default bridge back to ONLINE_BRIDGE
|
||||
* CB-11828: Adding dirty userAgent checking to see if we're running Jellybean or not for bridge modes
|
||||
* CB-11828: Switching default bridge back to ONLINE_BRIDGE
|
||||
* Add gradle build flag to enable dex in process for large projects
|
||||
* added ability for cordova activity to be viewed in a real full screen regardless of android version (as was the case in previous cordova versions)
|
||||
* Updating travis
|
||||
@@ -88,23 +71,23 @@ Changes For Third-Party WebView Developers:
|
||||
* Bump Target and Min API levels
|
||||
* Make evaluateJavaScript brige default
|
||||
* Creating an evaluateJavascript branch
|
||||
* [CB-11727](https://issues.apache.org/jira/browse/CB-11727) - travis ci setup is still using 0.10.32 node
|
||||
* [CB-11726](https://issues.apache.org/jira/browse/CB-11726) - Update appveyor node versions to 4 and 6, so they will always use the latest versions
|
||||
* CB-11727 - travis ci setup is still using 0.10.32 node
|
||||
* CB-11726 - Update appveyor node versions to 4 and 6, so they will always use the latest versions
|
||||
* Close invalid PRs
|
||||
* [CB-11683](https://issues.apache.org/jira/browse/CB-11683) Fixed linking to directories during plugin installation.
|
||||
* fixed [CB-11078](https://issues.apache.org/jira/browse/CB-11078) Empty string for BackgroundColor preference crashes application This closes #316
|
||||
* CB-11683 Fixed linking to directories during plugin installation.
|
||||
* fixed CB-11078 Empty string for BackgroundColor preference crashes application This closes #316
|
||||
* Update JS snapshot to version 5.3.0-dev (via coho)
|
||||
* Set VERSION to 5.3.0-dev (via coho)
|
||||
* [CB-11626](https://issues.apache.org/jira/browse/CB-11626) Updated RELEASENOTES and Version for release 5.2.2
|
||||
* CB-11626 Updated RELEASENOTES and Version for release 5.2.2
|
||||
* updated cordoova-common to 1.4.0
|
||||
* This closes #195
|
||||
* Updaing the gradle for the tests to the latest
|
||||
* [CB-11550](https://issues.apache.org/jira/browse/CB-11550) Updated RELEASENOTES for release 5.2.1
|
||||
* [CB-9489](https://issues.apache.org/jira/browse/CB-9489) Fixed "endless waiting for emulator" issue
|
||||
* CB-11550 Updated RELEASENOTES for release 5.2.1
|
||||
* CB-9489 Fixed "endless waiting for emulator" issue
|
||||
* Update JS snapshot to version 5.3.0-dev (via coho)
|
||||
* Set VERSION to 5.3.0-dev (via coho)
|
||||
* [CB-11444](https://issues.apache.org/jira/browse/CB-11444) Updated RELEASENOTES and Version for release 5.2.0
|
||||
* [CB-11481](https://issues.apache.org/jira/browse/CB-11481) android-library is deprecated use com.android.library instead
|
||||
* CB-11444 Updated RELEASENOTES and Version for release 5.2.0
|
||||
* CB-11481: android-library is deprecated use com.android.library instead
|
||||
|
||||
### 5.2.2 (Jul 26, 2016)
|
||||
* [CB-11615](https://issues.apache.org/jira/browse/CB-11615) updated `cordoova-common` to `1.4.0`
|
||||
|
||||
13
bin/templates/cordova/Api.js
vendored
13
bin/templates/cordova/Api.js
vendored
@@ -66,13 +66,12 @@ function Api(platform, platformRootDir, events) {
|
||||
this.locations = {
|
||||
root: self.root,
|
||||
www: path.join(self.root, 'assets/www'),
|
||||
res: path.join(self.root, 'res'),
|
||||
res: path.relative(self.root, path.join(self.root, 'res')),
|
||||
platformWww: path.join(self.root, 'platform_www'),
|
||||
configXml: path.join(self.root, 'res/xml/config.xml'),
|
||||
defaultConfigXml: path.join(self.root, 'cordova/defaults.xml'),
|
||||
strings: path.join(self.root, 'res/values/strings.xml'),
|
||||
manifest: path.join(self.root, 'AndroidManifest.xml'),
|
||||
build: path.join(self.root, 'build'),
|
||||
// NOTE: Due to platformApi spec we need to return relative paths here
|
||||
cordovaJs: 'bin/templates/project/assets/www/cordova.js',
|
||||
cordovaJsSrc: 'cordova-js-src'
|
||||
@@ -86,7 +85,7 @@ function Api(platform, platformRootDir, events) {
|
||||
this.locations.strings = path.join(self.root, 'app/src/main/res/xml/strings.xml');
|
||||
this.locations.manifest = path.join(self.root, 'app/src/main/AndroidManifest.xml');
|
||||
this.locations.www = path.join(self.root, 'app/src/main/assets/www');
|
||||
this.locations.res = path.join(self.root, 'app/src/main/res');
|
||||
this.locations.res = path.relative(self.root, path.join(self.root, 'app/src/main/res'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,12 +241,10 @@ Api.prototype.addPlugin = function (plugin, installOptions) {
|
||||
// Do some basic argument parsing
|
||||
var opts = {};
|
||||
|
||||
// Skip cleaning prepared files when not invoking via cordova CLI.
|
||||
// Skip cleaning prepared files when not invoking via cordova CLI.
|
||||
opts.noPrepare = true;
|
||||
|
||||
if(!AndroidStudio.isAndroidStudioProject(self.root) && !project.isClean()) {
|
||||
return self.clean(opts);
|
||||
}
|
||||
return self.clean(opts);
|
||||
})
|
||||
.then(function () {
|
||||
return PluginManager.get(self.platform, self.locations, project)
|
||||
@@ -398,8 +395,6 @@ Api.prototype.clean = function(cleanOptions) {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Performs a requirements check for current platform. Each platform defines its
|
||||
* own set of requirements, which should be resolved before platform can be
|
||||
|
||||
9
bin/templates/cordova/lib/AndroidProject.js
vendored
9
bin/templates/cordova/lib/AndroidProject.js
vendored
@@ -197,14 +197,5 @@ AndroidProject.prototype.getUninstaller = function (type) {
|
||||
return pluginHandlers.getUninstaller(type);
|
||||
};
|
||||
|
||||
/*
|
||||
* This checks if an Android project is clean or has old build artifacts
|
||||
*/
|
||||
|
||||
AndroidProject.prototype.isClean = function() {
|
||||
var build_path = path.join(this.projectDir, 'build');
|
||||
//If the build directory doesn't exist, it's clean
|
||||
return !(fs.existsSync(build_path));
|
||||
};
|
||||
|
||||
module.exports = AndroidProject;
|
||||
|
||||
45
bin/templates/cordova/lib/AndroidStudio.js
vendored
45
bin/templates/cordova/lib/AndroidStudio.js
vendored
@@ -4,39 +4,26 @@
|
||||
* @param {String} root Root folder of the project
|
||||
*/
|
||||
|
||||
/*jshint esnext: false */
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
var CordovaError = require('cordova-common').CordovaError;
|
||||
|
||||
module.exports.isAndroidStudioProject = function isAndroidStudioProject(root) {
|
||||
function isAndroidStudioProject(root) {
|
||||
var eclipseFiles = ['AndroidManifest.xml', 'libs', 'res', 'project.properties', 'platform_www'];
|
||||
var androidStudioFiles = ['app', 'gradle', 'app/src/main/res'];
|
||||
|
||||
// assume it is an AS project and not an Eclipse project
|
||||
var isEclipse = false;
|
||||
var isAS = true;
|
||||
|
||||
if(!fs.existsSync(root)) {
|
||||
throw new CordovaError('AndroidStudio.js:inAndroidStudioProject root does not exist: ' + root);
|
||||
var androidStudioFiles = ['app', 'gradle', 'build', 'app/src/main/assets'];
|
||||
var file;
|
||||
for(file of eclipseFiles) {
|
||||
if(fs.existsSync(path.join(root, file))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// if any of the following exists, then we are not an ASProj
|
||||
eclipseFiles.forEach(function(file) {
|
||||
if(fs.existsSync(path.join(root, file))) {
|
||||
isEclipse = true;
|
||||
}
|
||||
});
|
||||
|
||||
// if it is NOT an eclipse project, check that all required files exist
|
||||
if(!isEclipse) {
|
||||
androidStudioFiles.forEach(function(file){
|
||||
if(!fs.existsSync(path.join(root, file))) {
|
||||
console.log('missing file :: ' + file);
|
||||
isAS = false;
|
||||
}
|
||||
});
|
||||
for(file of androidStudioFiles) {
|
||||
if(!fs.existsSync(path.join(root, file))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return (!isEclipse && isAS);
|
||||
};
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports.isAndroidStudioProject = isAndroidStudioProject;
|
||||
|
||||
8
bin/templates/cordova/lib/prepare.js
vendored
8
bin/templates/cordova/lib/prepare.js
vendored
@@ -46,8 +46,8 @@ module.exports.prepare = function (cordovaProject, options) {
|
||||
return updateProjectAccordingTo(self._config, self.locations);
|
||||
})
|
||||
.then(function () {
|
||||
updateIcons(cordovaProject, path.relative(cordovaProject.root, self.locations.res));
|
||||
updateSplashes(cordovaProject, path.relative(cordovaProject.root, self.locations.res));
|
||||
updateIcons(cordovaProject, self.locations.res);
|
||||
updateSplashes(cordovaProject, self.locations.res);
|
||||
})
|
||||
.then(function () {
|
||||
events.emit('verbose', 'Prepared android project successfully');
|
||||
@@ -70,8 +70,8 @@ module.exports.clean = function (options) {
|
||||
var self = this;
|
||||
return Q().then(function () {
|
||||
cleanWww(projectRoot, self.locations);
|
||||
cleanIcons(projectRoot, projectConfig, path.relative(projectRoot, self.locations.res));
|
||||
cleanSplashes(projectRoot, projectConfig, path.relative(projectRoot, self.locations.res));
|
||||
cleanIcons(projectRoot, projectConfig, self.locations.res);
|
||||
cleanSplashes(projectRoot, projectConfig, self.locations.res);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
// Coho updates this line:
|
||||
var VERSION = "6.1.1";
|
||||
var VERSION = "6.0.0";
|
||||
|
||||
module.exports.version = VERSION;
|
||||
|
||||
|
||||
14
bin/templates/project/assets/www/cordova.js
vendored
14
bin/templates/project/assets/www/cordova.js
vendored
@@ -1,5 +1,5 @@
|
||||
// Platform: android
|
||||
// a3732cb71d9b1dd590338e8cf44196f366d46da3
|
||||
// 53ea1913735222d326e65326e03391405df3cd4e
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
@@ -19,7 +19,7 @@
|
||||
under the License.
|
||||
*/
|
||||
;(function() {
|
||||
var PLATFORM_VERSION_BUILD_LABEL = '6.1.1';
|
||||
var PLATFORM_VERSION_BUILD_LABEL = '6.0.0';
|
||||
// file: src/scripts/require.js
|
||||
|
||||
/*jshint -W079 */
|
||||
@@ -330,7 +330,7 @@ module.exports = cordova;
|
||||
|
||||
});
|
||||
|
||||
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js
|
||||
// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js
|
||||
define("cordova/android/nativeapiprovider", function(require, exports, module) {
|
||||
|
||||
/**
|
||||
@@ -353,7 +353,7 @@ module.exports = {
|
||||
|
||||
});
|
||||
|
||||
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js
|
||||
// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js
|
||||
define("cordova/android/promptbasednativeapi", function(require, exports, module) {
|
||||
|
||||
/**
|
||||
@@ -886,7 +886,7 @@ module.exports = channel;
|
||||
|
||||
});
|
||||
|
||||
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/exec.js
|
||||
// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/exec.js
|
||||
define("cordova/exec", function(require, exports, module) {
|
||||
|
||||
/**
|
||||
@@ -1649,7 +1649,7 @@ exports.reset();
|
||||
|
||||
});
|
||||
|
||||
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/platform.js
|
||||
// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/platform.js
|
||||
define("cordova/platform", function(require, exports, module) {
|
||||
|
||||
// The last resume event that was received that had the result of a plugin call.
|
||||
@@ -1759,7 +1759,7 @@ function onMessageFromNative(msg) {
|
||||
|
||||
});
|
||||
|
||||
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/plugin/android/app.js
|
||||
// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/plugin/android/app.js
|
||||
define("cordova/plugin/android/app", function(require, exports, module) {
|
||||
|
||||
var exec = require('cordova/exec');
|
||||
|
||||
@@ -30,7 +30,7 @@ buildscript {
|
||||
// http://tools.android.com/tech-docs/new-build-system/version-compatibility
|
||||
// and https://issues.apache.org/jira/browse/CB-8143
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.2.1'
|
||||
classpath 'com.android.tools.build:gradle:2.2.0'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ def promptForReleaseKeyPassword() {
|
||||
|
||||
gradle.taskGraph.whenReady { taskGraph ->
|
||||
taskGraph.getAllTasks().each() { task ->
|
||||
if (task.name == 'validateReleaseSigning' || task.name == 'validateSigningRelease') {
|
||||
if (task.name == 'validateReleaseSigning') {
|
||||
promptForReleaseKeyPassword()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,10 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter();
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.2.1'
|
||||
classpath 'com.android.tools.build:gradle:2.1.0'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# Indicates whether an apk should be generated for each density.
|
||||
split.density=false
|
||||
# Project target.
|
||||
target=android-25
|
||||
target=android-24
|
||||
apk-configurations=
|
||||
renderscript.opt.level=O0
|
||||
android.library=true
|
||||
|
||||
@@ -31,7 +31,7 @@ import android.webkit.WebChromeClient.CustomViewCallback;
|
||||
* are not expected to implement it.
|
||||
*/
|
||||
public interface CordovaWebView {
|
||||
public static final String CORDOVA_VERSION = "6.1.1";
|
||||
public static final String CORDOVA_VERSION = "6.0.0";
|
||||
|
||||
void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences);
|
||||
|
||||
|
||||
96
package.json
96
package.json
@@ -1,49 +1,49 @@
|
||||
{
|
||||
"name": "cordova-android",
|
||||
"version": "6.1.1",
|
||||
"description": "cordova-android release",
|
||||
"bin": {
|
||||
"create": "bin/create"
|
||||
},
|
||||
"main": "bin/templates/cordova/Api.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git-wip-us.apache.org/repos/asf/cordova-android.git"
|
||||
},
|
||||
"keywords": [
|
||||
"android",
|
||||
"cordova",
|
||||
"apache"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "npm run jshint && jasmine-node --color spec/unit",
|
||||
"cover": "istanbul cover --root bin/templates/cordova --print detail node_modules/jasmine-node/bin/jasmine-node -- spec/unit",
|
||||
"test-build": "jasmine-node --captureExceptions --color spec/e2e",
|
||||
"jshint": "node node_modules/jshint/bin/jshint bin && node node_modules/jshint/bin/jshint spec"
|
||||
},
|
||||
"author": "Apache Software Foundation",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"cordova-common": "^1.5.0",
|
||||
"elementtree": "^0.1.6",
|
||||
"nopt": "^3.0.1",
|
||||
"properties-parser": "^0.2.3",
|
||||
"q": "^1.4.1",
|
||||
"shelljs": "^0.5.3"
|
||||
},
|
||||
"bundledDependencies": [
|
||||
"cordova-common",
|
||||
"elementtree",
|
||||
"nopt",
|
||||
"properties-parser",
|
||||
"q",
|
||||
"shelljs"
|
||||
],
|
||||
"devDependencies": {
|
||||
"istanbul": "^0.4.2",
|
||||
"jasmine-node": "^1.14.5",
|
||||
"jshint": "^2.6.0",
|
||||
"promise-matchers": "~0",
|
||||
"rewire": "^2.1.3"
|
||||
}
|
||||
}
|
||||
"name": "cordova-android",
|
||||
"version": "6.0.0",
|
||||
"description": "cordova-android release",
|
||||
"bin": {
|
||||
"create": "bin/create"
|
||||
},
|
||||
"main": "bin/templates/cordova/Api.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git-wip-us.apache.org/repos/asf/cordova-android.git"
|
||||
},
|
||||
"keywords": [
|
||||
"android",
|
||||
"cordova",
|
||||
"apache"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "npm run jshint && jasmine-node --color spec/unit",
|
||||
"cover": "istanbul cover --root bin/templates/cordova --print detail node_modules/jasmine-node/bin/jasmine-node -- spec/unit",
|
||||
"test-build": "jasmine-node --captureExceptions --color spec/e2e",
|
||||
"jshint": "node node_modules/jshint/bin/jshint bin && node node_modules/jshint/bin/jshint spec"
|
||||
},
|
||||
"author": "Apache Software Foundation",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"cordova-common": "^1.5.0",
|
||||
"elementtree": "^0.1.6",
|
||||
"nopt": "^3.0.1",
|
||||
"properties-parser": "^0.2.3",
|
||||
"q": "^1.4.1",
|
||||
"shelljs": "^0.5.3"
|
||||
},
|
||||
"bundledDependencies": [
|
||||
"cordova-common",
|
||||
"elementtree",
|
||||
"nopt",
|
||||
"properties-parser",
|
||||
"q",
|
||||
"shelljs"
|
||||
],
|
||||
"devDependencies": {
|
||||
"istanbul": "^0.4.2",
|
||||
"jasmine-node": "^1.14.5",
|
||||
"jshint": "^2.6.0",
|
||||
"promise-matchers": "~0",
|
||||
"rewire": "^2.1.3"
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
var path = require('path'),
|
||||
actions = require('./helpers/projectActions.js');
|
||||
|
||||
var PLUGIN_ADD_TIMEOUT = 90000;
|
||||
var PLUGIN_ADD_TIMEOUT = 60000;
|
||||
|
||||
describe('plugin add', function() {
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Tests require that this folder exists.
|
||||
14
spec/unit/AndroidStudio.js
Normal file
14
spec/unit/AndroidStudio.js
Normal file
@@ -0,0 +1,14 @@
|
||||
var AndroidStudio = require('../../bin/templates/cordova/lib/AndroidStudio');
|
||||
|
||||
describe('AndroidStudio module', function () {
|
||||
it('should detect Android Studio project', function() {
|
||||
var root = './fixtures/android_studio_project';
|
||||
spyOn(AndroidStudio, 'isAndroidStudioProject').andReturn(true);
|
||||
AndroidStudio.isAndroidStudioProject(root);
|
||||
});
|
||||
it('should detect non Android Studio project', function() {
|
||||
var root = './fixtures/android_project';
|
||||
spyOn(AndroidStudio, 'isAndroidStudioProject').andReturn(false);
|
||||
AndroidStudio.isAndroidStudioProject(root);
|
||||
});
|
||||
});
|
||||
@@ -1,17 +0,0 @@
|
||||
|
||||
var path = require('path');
|
||||
var AndroidStudio = require('../../bin/templates/cordova/lib/AndroidStudio');
|
||||
|
||||
|
||||
describe('AndroidStudio module', function () {
|
||||
it('should return true for Android Studio project', function() {
|
||||
var root = path.join(__dirname,'../fixtures/android_studio_project/');
|
||||
var isAndStud = AndroidStudio.isAndroidStudioProject(root);
|
||||
expect(isAndStud).toBe(true);
|
||||
});
|
||||
it('should return false non Android Studio project', function() {
|
||||
var root = path.join(__dirname,'../fixtures/android_project/');
|
||||
var isAndStud = AndroidStudio.isAndroidStudioProject(root);
|
||||
expect(isAndStud).toBe(false);
|
||||
});
|
||||
});
|
||||
@@ -42,7 +42,7 @@ describe('addPlugin method', function () {
|
||||
pluginManager.addPlugin.andReturn(Q());
|
||||
spyOn(common.PluginManager, 'get').andReturn(pluginManager);
|
||||
|
||||
var projectSpy = jasmine.createSpyObj('AndroidProject', ['getPackageName', 'write', 'isClean']);
|
||||
var projectSpy = jasmine.createSpyObj('AndroidProject', ['getPackageName', 'write']);
|
||||
spyOn(AndroidProject, 'getProjectFile').andReturn(projectSpy);
|
||||
|
||||
oldClean = Api.__get__('Api.prototype.clean');
|
||||
|
||||
Reference in New Issue
Block a user