diff --git a/src/build/soong.ts b/src/build/soong.ts index 5b50986..bf43588 100644 --- a/src/build/soong.ts +++ b/src/build/soong.ts @@ -94,8 +94,11 @@ export type SoongModuleSpecific = { ) export type SoongModule = { - name: string - owner: string + // TODO: make these more strict while accommodating SoongNamespace + name?: string + owner?: string + + // Partition keys system_ext_specific?: boolean product_specific?: boolean soc_specific?: boolean @@ -303,7 +306,10 @@ export function serializeBlueprint(bp: SoongBlueprint) { let serializedModules = [] // Declare namespace - + serializedModules.push(serializeModule({ + _type: 'soong_namespace', + imports: bp.imports, + })) for (let module of bp.modules) { let serialized = serializeModule(module) @@ -312,10 +318,6 @@ export function serializeBlueprint(bp: SoongBlueprint) { return `// Generated by adevtool; do not edit -soong_namespace { - imports: [] -} - ${serializedModules.join('\n\n')} ` }