soong: Add support for RRO modules and omitting namespace block
This commit is contained in:
parent
0c5c2ee78b
commit
ea260df6d3
1 changed files with 16 additions and 7 deletions
|
@ -81,6 +81,10 @@ export interface DspModule {
|
||||||
sub_dir?: string
|
sub_dir?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface RroModule {
|
||||||
|
theme?: string
|
||||||
|
}
|
||||||
|
|
||||||
export interface SoongNamespace {
|
export interface SoongNamespace {
|
||||||
imports: Array<string>
|
imports: Array<string>
|
||||||
}
|
}
|
||||||
|
@ -98,7 +102,8 @@ export type SoongModuleSpecific = {
|
||||||
EtcModule |
|
EtcModule |
|
||||||
EtcXmlModule |
|
EtcXmlModule |
|
||||||
DspModule |
|
DspModule |
|
||||||
SoongNamespace
|
SoongNamespace |
|
||||||
|
RroModule
|
||||||
)
|
)
|
||||||
|
|
||||||
export type SoongModule = {
|
export type SoongModule = {
|
||||||
|
@ -117,8 +122,10 @@ export type SoongModule = {
|
||||||
} & SoongModuleSpecific
|
} & SoongModuleSpecific
|
||||||
|
|
||||||
export interface SoongBlueprint {
|
export interface SoongBlueprint {
|
||||||
imports: Array<string>
|
noNamespace?: boolean
|
||||||
modules: IterableIterator<SoongModule>
|
imports?: Array<string>
|
||||||
|
|
||||||
|
modules: Iterable<SoongModule>
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRelativeInstallPath(entry: BlobEntry, pathParts: Array<string>, installDir: string) {
|
function getRelativeInstallPath(entry: BlobEntry, pathParts: Array<string>, installDir: string) {
|
||||||
|
@ -324,10 +331,12 @@ export function serializeBlueprint(bp: SoongBlueprint) {
|
||||||
let serializedModules = []
|
let serializedModules = []
|
||||||
|
|
||||||
// Declare namespace
|
// Declare namespace
|
||||||
|
if (!bp.noNamespace) {
|
||||||
serializedModules.push(serializeModule({
|
serializedModules.push(serializeModule({
|
||||||
_type: 'soong_namespace',
|
_type: 'soong_namespace',
|
||||||
imports: bp.imports,
|
...(bp.imports != undefined && { imports: bp.imports })
|
||||||
}))
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
for (let module of bp.modules) {
|
for (let module of bp.modules) {
|
||||||
let serialized = serializeModule(module)
|
let serialized = serializeModule(module)
|
||||||
|
|
Loading…
Reference in a new issue