mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-11 00:00:05 +08:00
Fixing the Android Studio detection and making it automatically pick the right builder, good for upgrading Cordova
This commit is contained in:
Vendored
+2
@@ -343,6 +343,8 @@ Api.prototype.removePlugin = function (plugin, uninstallOptions) {
|
||||
*/
|
||||
Api.prototype.build = function (buildOptions) {
|
||||
var self = this;
|
||||
if(this.android_studio)
|
||||
buildOptions.studio = true;
|
||||
return require('./lib/check_reqs').run()
|
||||
.then(function () {
|
||||
return require('./lib/build').run.call(self, buildOptions);
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ 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 eclipseFiles = ['AndroidManifest.xml', 'libs', 'res'];
|
||||
var androidStudioFiles = ['app', 'gradle', 'app/src/main/res'];
|
||||
|
||||
// assume it is an AS project and not an Eclipse project
|
||||
|
||||
Reference in New Issue
Block a user