@@ -5,13 +5,6 @@ import path from "node:path";
55import { AndroidTriplet } from "./triplets.js" ;
66import { determineLibraryBasename } from "../path-utils.js" ;
77
8- export const DEFAULT_ANDROID_TRIPLETS = [
9- "aarch64-linux-android" ,
10- "armv7a-linux-androideabi" ,
11- "i686-linux-android" ,
12- "x86_64-linux-android" ,
13- ] as const satisfies AndroidTriplet [ ] ;
14-
158type AndroidArchitecture = "armeabi-v7a" | "arm64-v8a" | "x86" | "x86_64" ;
169
1710export const ANDROID_ARCHITECTURES = {
@@ -44,12 +37,15 @@ export async function createAndroidLibsDirectory({
4437 // Delete and recreate any existing output directory
4538 await fs . promises . rm ( outputPath , { recursive : true , force : true } ) ;
4639 await fs . promises . mkdir ( outputPath , { recursive : true } ) ;
47- for ( const [ triplet , libraryPath ] of Object . entries ( libraryPathByTriplet ) ) {
40+ for ( const [ triplet , libraryPath ] of Object . entries ( libraryPathByTriplet ) as [
41+ AndroidTriplet ,
42+ string ,
43+ ] [ ] ) {
4844 assert (
4945 fs . existsSync ( libraryPath ) ,
5046 `Library not found: ${ libraryPath } for triplet ${ triplet } ` ,
5147 ) ;
52- const arch = ANDROID_ARCHITECTURES [ triplet as AndroidTriplet ] ;
48+ const arch = ANDROID_ARCHITECTURES [ triplet ] ;
5349 const archOutputPath = path . join ( outputPath , arch ) ;
5450 await fs . promises . mkdir ( archOutputPath , { recursive : true } ) ;
5551 // Strip the ".node" extension from the library name
0 commit comments