Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 20d496a

Browse files
Respect ANDROID_NDK_HOME env variable in case androidNdkPath is not specified
1 parent 07483c0 commit 20d496a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎snapshot/android/project-snapshot-generator.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ ProjectSnapshotGenerator.prototype.generate = function(generationOptions) {
155155
shelljs.mkdir("-p", this.getBuildPath());
156156

157157
// Generate tns-java-classes.js if needed
158-
var tnsJavaClassesDestination = path.join(this.getBuildPath(), "tns-java-classes.js");
158+
const tnsJavaClassesDestination = path.join(this.getBuildPath(), "tns-java-classes.js");
159159
if (generationOptions.tnsJavaClassesPath) {
160160
if (generationOptions.tnsJavaClassesPath != tnsJavaClassesDestination) {
161161
shelljs.cp(generationOptions.tnsJavaClassesPath, tnsJavaClassesDestination);
@@ -171,6 +171,8 @@ ProjectSnapshotGenerator.prototype.generate = function(generationOptions) {
171171
path.resolve(process.cwd(), generationOptions.snapshotToolsPath)) :
172172
path.join(os.tmpdir(), "snapshot-tools");
173173

174+
const androidNdkPath = generationOptions.androidNdkPath || process.env.ANDROID_NDK_HOME;
175+
174176
console.log("Snapshot tools path: " + snapshotToolsPath);
175177

176178
// Generate snapshots
@@ -182,7 +184,7 @@ ProjectSnapshotGenerator.prototype.generate = function(generationOptions) {
182184
v8Version: generationOptions.v8Version || this.getV8Version(),
183185
preprocessedInputFile: generationOptions.preprocessedInputFile,
184186
useLibs: generationOptions.useLibs || false,
185-
androidNdkPath: generationOptions.androidNdkPath
187+
androidNdkPath
186188
}).then(() => {
187189
console.log("Snapshots build finished succesfully!");
188190

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /