Skip to content

Commit

Permalink
Remove no longer needed AndroidStudio.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Menardi committed Jul 10, 2018
1 parent 350d35f commit 4b0725d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 46 deletions.
17 changes: 0 additions & 17 deletions bin/templates/cordova/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ var path = require('path');
var Q = require('q');

var AndroidProject = require('./lib/AndroidProject');
var AndroidStudio = require('./lib/AndroidStudio');
var PluginManager = require('cordova-common').PluginManager;

var CordovaLogger = require('cordova-common').CordovaLogger;
Expand Down Expand Up @@ -214,22 +213,6 @@ Api.prototype.addPlugin = function (plugin, installOptions) {
}

return Q().then(function () {
// CB-11964: Do a clean when installing the plugin code to get around
// the Gradle bug introduced by the Android Gradle Plugin Version 2.2
// TODO: Delete when the next version of Android Gradle plugin comes out
// Since clean doesn't just clean the build, it also wipes out www, we need
// to pass additional options.

// Do some basic argument parsing
var opts = {};

// Skip cleaning prepared files when not invoking via cordova CLI.
opts.noPrepare = true;

if (!AndroidStudio.isAndroidStudioProject(self.root) && !project.isClean()) {
return self.clean(opts);
}
}).then(function () {
return PluginManager.get(self.platform, self.locations, project).addPlugin(plugin, installOptions);
}).then(function () {
if (plugin.getFrameworks(this.platform).length === 0) return;
Expand Down
11 changes: 2 additions & 9 deletions bin/templates/cordova/lib/AndroidProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ var fs = require('fs');
var path = require('path');
var properties_parser = require('properties-parser');
var AndroidManifest = require('./AndroidManifest');
var AndroidStudio = require('./AndroidStudio');
var pluginHandlers = require('./pluginHandlers');

var projectFileCache = {};
Expand Down Expand Up @@ -62,10 +61,7 @@ function AndroidProject (projectDir) {
this._dirty = false;
this.projectDir = projectDir;
this.platformWww = path.join(this.projectDir, 'platform_www');
this.www = path.join(this.projectDir, 'assets/www');
if (AndroidStudio.isAndroidStudioProject(projectDir) === true) {
this.www = path.join(this.projectDir, 'app/src/main/assets/www');
}
this.www = path.join(this.projectDir, 'app/src/main/assets/www');
}

AndroidProject.getProjectFile = function (projectDir) {
Expand All @@ -92,10 +88,7 @@ AndroidProject.purgeCache = function (projectDir) {
* @return {String} The name of the package
*/
AndroidProject.prototype.getPackageName = function () {
var manifestPath = path.join(this.projectDir, 'AndroidManifest.xml');
if (AndroidStudio.isAndroidStudioProject(this.projectDir) === true) {
manifestPath = path.join(this.projectDir, 'app/src/main/AndroidManifest.xml');
}
var manifestPath = path.join(this.projectDir, 'app/src/main/AndroidManifest.xml');
return new AndroidManifest(manifestPath).getPackageId();
};

Expand Down
9 changes: 0 additions & 9 deletions bin/templates/cordova/lib/AndroidStudio.js

This file was deleted.

11 changes: 0 additions & 11 deletions spec/unit/AndroidStudio.spec.js

This file was deleted.

0 comments on commit 4b0725d

Please sign in to comment.