@expo-harmony/prebuild-config 55.0.0-harmony.9 → 55.0.22-harmony.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.
|
@@ -31,11 +31,24 @@ function withAutolinkingMods(config, options) {
|
|
|
31
31
|
const project = await node_fs_1.default.promises.realpath(root);
|
|
32
32
|
const build = (0, buildDescriptor_1.createHarmonyBuildDescriptor)(harmony, mod._internal?.harmonySigningConfig?.name ?? null);
|
|
33
33
|
const platform = (0, buildDescriptor_1.resolveHarmonyBuildPath)(project, build.harmonyRoot);
|
|
34
|
-
const
|
|
34
|
+
const moduleBuilds = harmony.moduleBuilds || {};
|
|
35
|
+
const moduleBuildSettings = {
|
|
36
|
+
compatibleSdkVersion: harmony.compatibleSdkVersionString,
|
|
37
|
+
targetSdkVersion: harmony.targetSdkVersionString,
|
|
38
|
+
abiFilters: harmony.abiFilters,
|
|
39
|
+
};
|
|
40
|
+
// Normal CLI/DevEco builds relink without evaluating Expo config; retain these inputs.
|
|
41
|
+
const inputs = node_path_1.default.join(project, '.expo/harmony/module-build-options.json');
|
|
42
|
+
const linkOptions = {
|
|
43
|
+
moduleBuilds,
|
|
44
|
+
moduleBuildSettings,
|
|
35
45
|
projectRoot: project,
|
|
36
46
|
harmonyProjectPath: platform,
|
|
37
47
|
buildType: mode,
|
|
38
|
-
}
|
|
48
|
+
};
|
|
49
|
+
const prepared = await (0, expo_modules_autolinking_1.prepareModulesAsync)(linkOptions);
|
|
50
|
+
const result = await (0, expo_modules_autolinking_1.linkPreparedModulesAsync)(linkOptions, prepared);
|
|
51
|
+
(0, config_plugins_1.recordManagedFile)(mod, inputs, 'autolinking');
|
|
39
52
|
mod._internal ??= {};
|
|
40
53
|
mod._internal.harmonyAutolinkingModules = result.modules;
|
|
41
54
|
for (const relative of result.managedArtifacts) {
|
|
@@ -18,6 +18,10 @@ function withPreparationMod(config) {
|
|
|
18
18
|
const root = mod.modRequest.projectRoot;
|
|
19
19
|
const platform = mod.modRequest.platformProjectRoot;
|
|
20
20
|
const manifest = mod.modRequest.ignoreExistingNativeFiles ? null : await (0, stale_1.readPreviousCngManifestAsync)(root);
|
|
21
|
+
// Expo copies the template before mods run; use the state captured by the CLI.
|
|
22
|
+
const freshPrebuild = process.env.EXPO_HARMONY_PREBUILD_FRESH;
|
|
23
|
+
const isFreshGeneration = freshPrebuild === '1'
|
|
24
|
+
|| (freshPrebuild === undefined && manifest === null);
|
|
21
25
|
const plugins = (0, internal_1.getHarmonyConfigPlugins)(mod);
|
|
22
26
|
const stale = (0, stale_1.findStaleConfigPlugins)(manifest, plugins);
|
|
23
27
|
mod._internal ??= {};
|
|
@@ -35,8 +39,14 @@ function withPreparationMod(config) {
|
|
|
35
39
|
mod._internal.harmonyStaleConfigPlugins = stale;
|
|
36
40
|
mod._internal.harmonyStalePluginFiles = await (0, stale_1.removeStalePluginFilesAsync)(root, manifest, stale, plugins, mod.modRequest.introspect);
|
|
37
41
|
if (harmony.signingConfigFile) {
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
try {
|
|
43
|
+
const signing = await (0, signing_1.readSigningConfigFile)(root, harmony.signingConfigFile);
|
|
44
|
+
mod._internal.harmonySigningConfig = signing.config;
|
|
45
|
+
}
|
|
46
|
+
catch (cause) {
|
|
47
|
+
if (!isFreshGeneration)
|
|
48
|
+
throw cause;
|
|
49
|
+
}
|
|
40
50
|
}
|
|
41
51
|
if (mod.modRequest.introspect)
|
|
42
52
|
return mod;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo-harmony/prebuild-config",
|
|
3
|
-
"version": "55.0.
|
|
3
|
+
"version": "55.0.22-harmony.2",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"react-native",
|
|
6
6
|
"expo",
|
|
@@ -43,21 +43,21 @@
|
|
|
43
43
|
"./package.json": "./package.json"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@expo-harmony/config-plugins": "55.0.
|
|
47
|
-
"@expo-harmony/expo-build-properties": "55.0.
|
|
48
|
-
"@expo-harmony/expo-modules-autolinking": "55.0.
|
|
49
|
-
"@expo-harmony/template": "55.0.0-harmony.
|
|
46
|
+
"@expo-harmony/config-plugins": "55.0.11-harmony.2",
|
|
47
|
+
"@expo-harmony/expo-build-properties": "55.0.18-harmony.2",
|
|
48
|
+
"@expo-harmony/expo-modules-autolinking": "55.0.27-harmony.2",
|
|
49
|
+
"@expo-harmony/template": "55.0.0-harmony.9",
|
|
50
50
|
"@expo/config": "55.0.17",
|
|
51
|
-
"@expo/config-plugins": "55.0.
|
|
51
|
+
"@expo/config-plugins": "55.0.11",
|
|
52
52
|
"@react-native-community/cli-config": "15.1.3",
|
|
53
53
|
"json5": "2.2.3"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"expo": "55.0.
|
|
56
|
+
"expo": "55.0.31"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "18.19.0",
|
|
60
|
-
"expo": "55.0.
|
|
60
|
+
"expo": "55.0.31",
|
|
61
61
|
"react": "19.2.3",
|
|
62
62
|
"react-native": "0.84.1",
|
|
63
63
|
"typescript": "6.0.3"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { linkPreparedModulesAsync, prepareModulesAsync } from '@expo-harmony/expo-modules-autolinking';
|
|
5
|
+
import type { LinkOptions } from '@expo-harmony/expo-modules-autolinking';
|
|
5
6
|
import { normalizeHarmonyConfig, recordManagedFile, stableHarmonyJson, withHarmonyAutolinking } from '@expo-harmony/config-plugins';
|
|
6
7
|
import { getHarmonyConfigPlugins, withCngManifest } from '@expo-harmony/config-plugins/internal';
|
|
7
8
|
|
|
@@ -38,12 +39,26 @@ export function withAutolinkingMods(config, options: HarmonyPrebuildOptions) {
|
|
|
38
39
|
const build = createHarmonyBuildDescriptor(harmony, mod._internal?.harmonySigningConfig?.name ?? null);
|
|
39
40
|
const platform = resolveHarmonyBuildPath(project, build.harmonyRoot);
|
|
40
41
|
|
|
41
|
-
const
|
|
42
|
+
const moduleBuilds = harmony.moduleBuilds || {};
|
|
43
|
+
const moduleBuildSettings = {
|
|
44
|
+
compatibleSdkVersion: harmony.compatibleSdkVersionString,
|
|
45
|
+
targetSdkVersion: harmony.targetSdkVersionString,
|
|
46
|
+
abiFilters: harmony.abiFilters,
|
|
47
|
+
};
|
|
48
|
+
// Normal CLI/DevEco builds relink without evaluating Expo config; retain these inputs.
|
|
49
|
+
const inputs = path.join(project, '.expo/harmony/module-build-options.json');
|
|
50
|
+
|
|
51
|
+
const linkOptions: LinkOptions = {
|
|
52
|
+
moduleBuilds,
|
|
53
|
+
moduleBuildSettings,
|
|
42
54
|
projectRoot: project,
|
|
43
55
|
harmonyProjectPath: platform,
|
|
44
56
|
buildType: mode,
|
|
45
|
-
}
|
|
57
|
+
};
|
|
58
|
+
const prepared = await prepareModulesAsync(linkOptions);
|
|
59
|
+
const result = await linkPreparedModulesAsync(linkOptions, prepared);
|
|
46
60
|
|
|
61
|
+
recordManagedFile(mod, inputs, 'autolinking');
|
|
47
62
|
mod._internal ??= {};
|
|
48
63
|
mod._internal.harmonyAutolinkingModules = result.modules;
|
|
49
64
|
|
|
@@ -19,6 +19,10 @@ function withPreparationMod(config) {
|
|
|
19
19
|
const root = mod.modRequest.projectRoot;
|
|
20
20
|
const platform = mod.modRequest.platformProjectRoot;
|
|
21
21
|
const manifest = mod.modRequest.ignoreExistingNativeFiles ? null : await readPreviousCngManifestAsync(root);
|
|
22
|
+
// Expo copies the template before mods run; use the state captured by the CLI.
|
|
23
|
+
const freshPrebuild = process.env.EXPO_HARMONY_PREBUILD_FRESH;
|
|
24
|
+
const isFreshGeneration = freshPrebuild === '1'
|
|
25
|
+
|| (freshPrebuild === undefined && manifest === null);
|
|
22
26
|
const plugins = getHarmonyConfigPlugins(mod);
|
|
23
27
|
const stale = findStaleConfigPlugins(manifest, plugins);
|
|
24
28
|
|
|
@@ -40,8 +44,12 @@ function withPreparationMod(config) {
|
|
|
40
44
|
);
|
|
41
45
|
|
|
42
46
|
if (harmony.signingConfigFile) {
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
try {
|
|
48
|
+
const signing = await readSigningConfigFile(root, harmony.signingConfigFile);
|
|
49
|
+
mod._internal.harmonySigningConfig = signing.config;
|
|
50
|
+
} catch (cause) {
|
|
51
|
+
if (!isFreshGeneration) throw cause;
|
|
52
|
+
}
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
if (mod.modRequest.introspect) return mod;
|