mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
CB-13601: Fixing the standalone run scripts to make sure this works without using the CLI
This commit is contained in:
parent
43956c1bc8
commit
5d57eff612
4
bin/templates/cordova/lib/build.js
vendored
4
bin/templates/cordova/lib/build.js
vendored
@ -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: []
|
||||||
|
7
bin/templates/cordova/lib/emulator.js
vendored
7
bin/templates/cordova/lib/emulator.js
vendored
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user