| 113 | } |
| 114 | |
| 115 | async function buildNativeArtifacts(): Promise<void> { |
| 116 | console.log('Building Harmony HAR...'); |
| 117 | const harResult = Bun.spawnSync(['npm', 'run', 'build:harmony-har'], { |
| 118 | cwd: path.join(__dirname, '..'), |
| 119 | stdio: ['inherit', 'inherit', 'inherit'], |
| 120 | }); |
| 121 | if (harResult.exitCode !== 0) { |
| 122 | throw new Error( |
| 123 | `Harmony HAR build failed with exit code ${harResult.exitCode}`, |
| 124 | ); |
| 125 | } |
| 126 | |
| 127 | console.log('Building Android SO...'); |
| 128 | const soResult = Bun.spawnSync(['npm', 'run', 'build:so'], { |
| 129 | cwd: path.join(__dirname, '..'), |
| 130 | stdio: ['inherit', 'inherit', 'inherit'], |
| 131 | }); |
| 132 | if (soResult.exitCode !== 0) { |
| 133 | throw new Error( |
| 134 | `Android SO build failed with exit code ${soResult.exitCode}`, |
| 135 | ); |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | async function main(): Promise<void> { |
| 140 | try { |