@holisticon/nativescript-buildhelper
Version:
Basic NPM package for helping on automate releasing of NativeScript Apps
31 lines (30 loc) • 1.2 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
var child_process_1 = require("child_process");
/**
* Builds the current app
* @param release set to true if a release build is needed, involves the correct code signing
* @param keyStorePath path to Android KeyStore
* @param keyStorePassword KeyStore password
* @param keyStoreAlias KeyStore alias
* @param keyStoreAliasPassword KeyStore alias password
* @param debug set to true to build a version of the app for debugging purposes
*
*/
function buildApp(release, keyStorePath, keyStorePassword, keyStoreAlias, keyStoreAliasPassword, debug) {
if (debug === void 0) { debug = false; }
var promise = new Promise(function (resolve, reject) {
// Adding debug AAR if needed
if (debug) {
child_process_1.exec('cd platforms/android/libs/runtime-libs/ && rm -r nativescript-optimized.aar && mv nativescript-regular.aar nativescript-optimized.aar', function (err) {
if (err) {
throw err;
}
});
}
// TODO trigger normal build
});
return promise;
}
exports.buildApp = buildApp;
;