CB-13601: Fixing the standalone run scripts to make sure this works without using the CLI

This commit is contained in:
Joe Bowser 2017-11-22 11:39:40 -08:00
parent 43956c1bc8
commit 5d57eff612
2 changed files with 9 additions and 2 deletions

View File

@ -47,9 +47,11 @@ function parseOpts (options, resolvedTarget, projectRoot) {
keystoreType: String keystoreType: String
}, {}, options.argv, 0); }, {}, options.argv, 0);
// Android Studio Build method is the default
var ret = { var ret = {
buildType: options.release ? 'release' : 'debug', buildType: options.release ? 'release' : 'debug',
buildMethod: process.env.ANDROID_BUILD || 'gradle', buildMethod: process.env.ANDROID_BUILD || 'studio',
prepEnv: options.argv.prepenv, prepEnv: options.argv.prepenv,
arch: resolvedTarget && resolvedTarget.arch, arch: resolvedTarget && resolvedTarget.arch,
extraArgs: [] extraArgs: []

View File

@ -432,7 +432,12 @@ module.exports.resolveTarget = function (target) {
module.exports.install = function (givenTarget, buildResults) { module.exports.install = function (givenTarget, buildResults) {
var target; var target;
var manifest = new AndroidManifest(path.join(__dirname, '../../AndroidManifest.xml')); // We need to find the proper path to the Android Manifest
var manifestPath = path.join(__dirname, '..', '..', 'app', 'src', 'main', 'AndroidManifest.xml');
if (buildResults.buildMethod === 'gradle') {
mainfestPath = path.join(__dirname, '../../AndroidManifest.xml');
}
var manifest = new AndroidManifest(manifestPath);
var pkgName = manifest.getPackageId(); var pkgName = manifest.getPackageId();
// resolve the target emulator // resolve the target emulator