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 07483c0

Browse files
Exclude the snapshotted bundle from the apk even when blobs are used
1 parent 39f08e4 commit 07483c0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,27 +53,27 @@ ProjectSnapshotGenerator.installSnapshotArtefacts = function(projectRoot) {
5353
const buildPath = ProjectSnapshotGenerator.calculateBuildPath(projectRoot);
5454
const platformPath = path.join(projectRoot, "platforms/android");
5555
const assetsPath = path.join(platformPath, "src/main/assets");
56+
const configDestinationPath = path.join(platformPath, "configurations", SnapshotGenerator.SNAPSHOT_PACKAGE_NANE);
5657

5758
// Remove build folder to make sure that the apk will be fully rebuild
5859
shelljs.rm("-rf", path.join(platformPath, "build"));
5960

61+
// Copy include.gradle to the specified destination in the platforms folder
62+
shelljs.mkdir("-p", configDestinationPath);
63+
shelljs.cp(path.join(buildPath, "include.gradle"), path.join(configDestinationPath, "include.gradle"));
64+
6065
// Copy tns-java-classes.js
6166
if (shelljs.test("-e", path.join(buildPath, "tns-java-classes.js"))) {
6267
shelljs.cp(path.join(buildPath, "tns-java-classes.js"), path.join(assetsPath, "app/tns-java-classes.js"));
6368
}
6469

6570
if (shelljs.test("-e", path.join(buildPath, "ndk-build/libs"))) {
6671
// useLibs = true
67-
const libsDestinationPath = path.join(projectRoot, "platforms/android/src", SnapshotGenerator.SNAPSHOT_PACKAGE_NANE, "jniLibs");
68-
const configDestinationPath = path.join(projectRoot, "platforms/android/configurations", SnapshotGenerator.SNAPSHOT_PACKAGE_NANE);
72+
const libsDestinationPath = path.join(platformPath, "src", SnapshotGenerator.SNAPSHOT_PACKAGE_NANE, "jniLibs");
6973

7074
// Copy the libs to the specified destination in the platforms folder
7175
shelljs.mkdir("-p", libsDestinationPath);
7276
shelljs.cp("-R", path.join(buildPath, "ndk-build/libs") + "/", libsDestinationPath);
73-
74-
// Copy include.gradle to the specified destination in the platforms folder
75-
shelljs.mkdir("-p", configDestinationPath);
76-
shelljs.cp(path.join(buildPath, "include.gradle"), path.join(configDestinationPath, "include.gradle"));
7777
}
7878
else {
7979
// useLibs = false

‎snapshot/android/snapshot-generator.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ SnapshotGenerator.prototype.generate = function(options) {
175175

176176
// generates the actual .blob and .c files
177177
return this.runMksnapshotTool(options.snapshotToolsPath, preprocessedInputFile, options.v8Version, options.targetArchs, options.useLibs).then(() => {
178+
this.buildIncludeGradle();
178179
if (options.useLibs) {
179180
const androidNdkBuildPath = options.androidNdkPath ? path.join(options.androidNdkPath, "ndk-build") : "ndk-build";
180181
this.buildSnapshotLibs(androidNdkBuildPath, options.targetArchs);
181-
this.buildIncludeGradle();
182182
}
183183
return this.buildPath;
184184
});

0 commit comments

Comments
(0)

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