nativescript 9.2.0-alpha.0 → 9.2.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/commands/build.js
CHANGED
|
@@ -105,7 +105,12 @@ class BuildAndroidCommand extends BuildCommandBase {
|
|
|
105
105
|
let canExecute = await super.canExecuteCommandBase(platform);
|
|
106
106
|
if (canExecute) {
|
|
107
107
|
if (this.$options.release && !(0, helpers_1.hasValidAndroidSigning)(this.$options)) {
|
|
108
|
-
this.$
|
|
108
|
+
if (!this.$options.compiled) {
|
|
109
|
+
this.$errors.failWithHelp(constants_1.ANDROID_RELEASE_BUILD_ERROR_MESSAGE);
|
|
110
|
+
}
|
|
111
|
+
else if (this.$options.aab) {
|
|
112
|
+
this.$errors.failWithHelp(constants_1.ANDROID_APP_BUNDLE_SIGNING_ERROR_MESSAGE);
|
|
113
|
+
}
|
|
109
114
|
}
|
|
110
115
|
canExecute = await super.validateArgs(args, platform);
|
|
111
116
|
}
|
package/lib/commands/deploy.js
CHANGED
|
@@ -46,10 +46,10 @@ class DeployOnDeviceCommand extends command_base_1.ValidatePlatformCommandBase {
|
|
|
46
46
|
if (this.$mobileHelper.isAndroidPlatform(platform) &&
|
|
47
47
|
(this.$options.release || this.$options.aab) &&
|
|
48
48
|
!(0, helpers_1.hasValidAndroidSigning)(this.$options)) {
|
|
49
|
-
if (this.$options.release) {
|
|
49
|
+
if (this.$options.release && !this.$options.compiled) {
|
|
50
50
|
this.$errors.failWithHelp(constants_1.ANDROID_RELEASE_BUILD_ERROR_MESSAGE);
|
|
51
51
|
}
|
|
52
|
-
else {
|
|
52
|
+
else if (this.$options.aab) {
|
|
53
53
|
this.$errors.failWithHelp(constants_1.ANDROID_APP_BUNDLE_SIGNING_ERROR_MESSAGE);
|
|
54
54
|
}
|
|
55
55
|
}
|
package/lib/commands/run.js
CHANGED
|
@@ -122,10 +122,10 @@ class RunAndroidCommand {
|
|
|
122
122
|
}
|
|
123
123
|
if ((this.$options.release || this.$options.aab) &&
|
|
124
124
|
!(0, helpers_1.hasValidAndroidSigning)(this.$options)) {
|
|
125
|
-
if (this.$options.release) {
|
|
125
|
+
if (this.$options.release && !this.$options.compiled) {
|
|
126
126
|
this.$errors.failWithHelp(constants_2.ANDROID_RELEASE_BUILD_ERROR_MESSAGE);
|
|
127
127
|
}
|
|
128
|
-
else {
|
|
128
|
+
else if (this.$options.aab) {
|
|
129
129
|
this.$errors.failWithHelp(constants_2.ANDROID_APP_BUNDLE_SIGNING_ERROR_MESSAGE);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -130,7 +130,7 @@ class CompiledReleaseService {
|
|
|
130
130
|
return this.buildAndroid(projectData, buildData);
|
|
131
131
|
}
|
|
132
132
|
getCompilerPath(projectData) {
|
|
133
|
-
return this.getCompilerBin(projectData, "ns-
|
|
133
|
+
return this.getCompilerBin(projectData, "ns-compiled");
|
|
134
134
|
}
|
|
135
135
|
getCompilerBin(projectData, name) {
|
|
136
136
|
const packageDir = this.getPackageDir(projectData);
|
|
@@ -152,28 +152,17 @@ class CompiledReleaseService {
|
|
|
152
152
|
return packageDir;
|
|
153
153
|
}
|
|
154
154
|
async buildIOS(projectData, buildData) {
|
|
155
|
-
var _a, _b;
|
|
156
155
|
const projectRoot = this.getProjectRoot(projectData, "ios");
|
|
157
156
|
const name = projectData.projectName;
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
: null;
|
|
162
|
-
const workspace = (_a = generated === null || generated === void 0 ? void 0 : generated.workspace) !== null && _a !== void 0 ? _a : null;
|
|
163
|
-
if (!generated) {
|
|
164
|
-
try {
|
|
165
|
-
await this.$childProcess.spawnFromEvent("xcodegen", ["generate", "--quiet"], "close", { cwd: projectRoot, stdio: "inherit" });
|
|
166
|
-
}
|
|
167
|
-
catch (err) {
|
|
168
|
-
this.$errors.fail(err.code === "ENOENT"
|
|
169
|
-
? "The native iOS build generates its Xcode project with XcodeGen. Install it with 'brew install xcodegen'."
|
|
170
|
-
: err.message);
|
|
171
|
-
}
|
|
157
|
+
const marker = path.join(projectRoot, "ns-compiled-project.json");
|
|
158
|
+
if (!this.$fs.exists(marker)) {
|
|
159
|
+
this.$errors.fail(`${path.relative(projectData.projectDir, marker)} is missing: ns-compiled writes it when it compiles the app for iOS.`);
|
|
172
160
|
}
|
|
161
|
+
const generated = this.$fs.readJson(marker);
|
|
173
162
|
const projectArgs = [
|
|
174
|
-
...(workspace
|
|
175
|
-
? ["-workspace", workspace]
|
|
176
|
-
: ["-project",
|
|
163
|
+
...(generated.workspace
|
|
164
|
+
? ["-workspace", generated.workspace]
|
|
165
|
+
: ["-project", generated.project]),
|
|
177
166
|
"-scheme",
|
|
178
167
|
name,
|
|
179
168
|
"-configuration",
|
|
@@ -294,7 +283,7 @@ class CompiledReleaseService {
|
|
|
294
283
|
const logFile = path.join(projectRoot, "build", "compile-errors.log");
|
|
295
284
|
this.$fs.writeFile(logFile, errors.join("\n") + "\n");
|
|
296
285
|
try {
|
|
297
|
-
const result = await this.$childProcess.spawnFromEvent(process.execPath, [this.getCompilerBin(projectData, "ns-
|
|
286
|
+
const result = await this.$childProcess.spawnFromEvent(process.execPath, [this.getCompilerBin(projectData, "ns-compiled-retrace"), "--build-log", projectRoot, logFile], "close", { cwd: projectData.projectDir }, { throwError: false });
|
|
298
287
|
const mapped = result.stdout.split("\n").filter((line, k) => line && line !== errors[k]);
|
|
299
288
|
if (mapped.length) {
|
|
300
289
|
this.$logger.error(`Kotlin errors in your source:\n${mapped.join("\n")}`);
|
|
@@ -341,6 +330,9 @@ class CompiledReleaseService {
|
|
|
341
330
|
finally {
|
|
342
331
|
capture.stop();
|
|
343
332
|
}
|
|
333
|
+
if (!buildData.keyStorePath) {
|
|
334
|
+
this.$logger.warn("No --key-store-* options: signed with the debug key, which installs for testing but no store accepts.");
|
|
335
|
+
}
|
|
344
336
|
const outputName = projectData.projectName;
|
|
345
337
|
return buildData.androidBundle
|
|
346
338
|
? path.join(projectRoot, "build", "outputs", "bundle", "release", `${outputName}-release.aab`)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nativescript",
|
|
3
3
|
"main": "./lib/nativescript-cli-lib.js",
|
|
4
|
-
"version": "9.2.0-alpha.
|
|
4
|
+
"version": "9.2.0-alpha.2",
|
|
5
5
|
"author": "NativeScript <oss@nativescript.org>",
|
|
6
6
|
"description": "Command-line interface for building NativeScript projects",
|
|
7
7
|
"bin": {
|