soong: Add support for namespace imports
This commit is contained in:
parent
e78b08f85f
commit
d2e3fcd501
1 changed files with 9 additions and 7 deletions
|
@ -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')}
|
||||
`
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue