You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2016/11/03 19:49:51 UTC

[1/3] android commit: 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

Repository: cordova-android
Updated Branches:
  refs/heads/6.1.x 7e54af75d -> e85661378


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


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/011b57da
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/011b57da
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/011b57da

Branch: refs/heads/6.1.x
Commit: 011b57da54ba3fb19b85e6b84095cc31de371996
Parents: 7e54af7
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Nov 2 17:55:32 2016 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Nov 3 12:49:18 2016 -0700

----------------------------------------------------------------------
 .gitignore                                         |  1 -
 bin/templates/cordova/lib/AndroidStudio.js         |  7 ++++++-
 .../android_studio_project/app/build/placeholder   |  1 +
 spec/unit/AndroidStudio.js                         | 14 --------------
 spec/unit/AndroidStudio.spec.js                    | 17 +++++++++++++++++
 5 files changed, 24 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/011b57da/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 2abd107..6810237 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,7 +40,6 @@ Desktop.ini
 *.iml
 .idea
 npm-debug.log
-/framework/build
 node_modules/jshint
 node_modules/promise-matchers
 node_modules/jasmine-node

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/011b57da/bin/templates/cordova/lib/AndroidStudio.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/AndroidStudio.js b/bin/templates/cordova/lib/AndroidStudio.js
index 89c4c85..3b1e3d4 100644
--- a/bin/templates/cordova/lib/AndroidStudio.js
+++ b/bin/templates/cordova/lib/AndroidStudio.js
@@ -8,15 +8,20 @@
 
 var path = require('path');
 var fs = require('fs');
+var CordovaError = require('cordova-common').CordovaError;
 
 module.exports.isAndroidStudioProject = function isAndroidStudioProject(root) {
     var eclipseFiles = ['AndroidManifest.xml', 'libs', 'res', 'project.properties', 'platform_www'];
-    var androidStudioFiles = ['app', 'gradle', 'build', 'app/src/main/assets'];
+    var androidStudioFiles = ['app', 'gradle', 'build', '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);
+    }
+
     // if any of the following exists, then we are not an ASProj
     eclipseFiles.forEach(function(file) {
         if(fs.existsSync(path.join(root, file))) {

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/011b57da/spec/fixtures/android_studio_project/app/build/placeholder
----------------------------------------------------------------------
diff --git a/spec/fixtures/android_studio_project/app/build/placeholder b/spec/fixtures/android_studio_project/app/build/placeholder
new file mode 100644
index 0000000..8b6d9e2
--- /dev/null
+++ b/spec/fixtures/android_studio_project/app/build/placeholder
@@ -0,0 +1 @@
+Tests require that this folder exists.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/011b57da/spec/unit/AndroidStudio.js
----------------------------------------------------------------------
diff --git a/spec/unit/AndroidStudio.js b/spec/unit/AndroidStudio.js
deleted file mode 100644
index 74c11f2..0000000
--- a/spec/unit/AndroidStudio.js
+++ /dev/null
@@ -1,14 +0,0 @@
-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);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/011b57da/spec/unit/AndroidStudio.spec.js
----------------------------------------------------------------------
diff --git a/spec/unit/AndroidStudio.spec.js b/spec/unit/AndroidStudio.spec.js
new file mode 100644
index 0000000..95d5f4b
--- /dev/null
+++ b/spec/unit/AndroidStudio.spec.js
@@ -0,0 +1,17 @@
+
+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);
+    });
+});


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/3] android commit: Do not test for non-existent build folder

Posted by bo...@apache.org.
Do not test for non-existent build folder

This closes #348


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/94e9bd5e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/94e9bd5e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/94e9bd5e

Branch: refs/heads/6.1.x
Commit: 94e9bd5e263d677de0791107a62761a859a33fbd
Parents: 011b57d
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Nov 3 10:57:41 2016 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Nov 3 12:49:30 2016 -0700

----------------------------------------------------------------------
 bin/templates/cordova/lib/AndroidStudio.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/94e9bd5e/bin/templates/cordova/lib/AndroidStudio.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/AndroidStudio.js b/bin/templates/cordova/lib/AndroidStudio.js
index 3b1e3d4..335b334 100644
--- a/bin/templates/cordova/lib/AndroidStudio.js
+++ b/bin/templates/cordova/lib/AndroidStudio.js
@@ -12,7 +12,7 @@ var CordovaError = require('cordova-common').CordovaError;
 
 module.exports.isAndroidStudioProject = function isAndroidStudioProject(root) {
     var eclipseFiles = ['AndroidManifest.xml', 'libs', 'res', 'project.properties', 'platform_www'];
-    var androidStudioFiles = ['app', 'gradle', 'build', 'app/src/main/res'];
+    var androidStudioFiles = ['app', 'gradle', 'app/src/main/res'];
 
     // assume it is an AS project and not an Eclipse project
     var isEclipse = false;
@@ -33,6 +33,7 @@ module.exports.isAndroidStudioProject = function isAndroidStudioProject(root) {
     if(!isEclipse) {
         androidStudioFiles.forEach(function(file){
             if(!fs.existsSync(path.join(root, file))) {
+                console.log('missing file :: ' + file);
                 isAS = false;
             }
         });


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[3/3] android commit: Updating the timeout due to known travis issues

Posted by bo...@apache.org.
Updating the timeout due to known travis issues


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/e8566137
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/e8566137
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/e8566137

Branch: refs/heads/6.1.x
Commit: e8566137876ca54daabc6a1ee96ce2ecdebfaafe
Parents: 94e9bd5
Author: Joe Bowser <bo...@apache.org>
Authored: Thu Nov 3 11:35:42 2016 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Nov 3 12:49:40 2016 -0700

----------------------------------------------------------------------
 spec/e2e/plugin.spec.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/e8566137/spec/e2e/plugin.spec.js
----------------------------------------------------------------------
diff --git a/spec/e2e/plugin.spec.js b/spec/e2e/plugin.spec.js
index 908e4d9..17c4258 100644
--- a/spec/e2e/plugin.spec.js
+++ b/spec/e2e/plugin.spec.js
@@ -20,7 +20,7 @@
 var path    = require('path'),
     actions = require('./helpers/projectActions.js');
 
-var PLUGIN_ADD_TIMEOUT = 60000;
+var PLUGIN_ADD_TIMEOUT = 90000;
 
 describe('plugin add', function() {
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org