soong: Add prebuilt APEX support
This commit is contained in:
parent
f35674701d
commit
a7628cccb3
1 changed files with 12 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
||||||
import * as path from 'path'
|
|
||||||
import * as util from 'util'
|
import * as util from 'util'
|
||||||
|
|
||||||
import { BlobEntry, partPathToSrcPath } from '../blobs/entry'
|
import { BlobEntry, partPathToSrcPath } from '../blobs/entry'
|
||||||
|
@ -43,6 +42,11 @@ export interface ApkModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ApexModule {
|
||||||
|
src: string
|
||||||
|
prefer: boolean
|
||||||
|
}
|
||||||
|
|
||||||
export interface JarModule {
|
export interface JarModule {
|
||||||
jars: Array<string>
|
jars: Array<string>
|
||||||
}
|
}
|
||||||
|
@ -66,6 +70,7 @@ export type SoongModuleSpecific = {
|
||||||
ExecutableModule |
|
ExecutableModule |
|
||||||
ScriptModule |
|
ScriptModule |
|
||||||
ApkModule |
|
ApkModule |
|
||||||
|
ApexModule |
|
||||||
JarModule |
|
JarModule |
|
||||||
EtcXmlModule |
|
EtcXmlModule |
|
||||||
DspModule
|
DspModule
|
||||||
|
@ -211,6 +216,12 @@ export function blobToSoongModule(
|
||||||
filename_from_src: true,
|
filename_from_src: true,
|
||||||
...(relPath && { sub_dir: relPath }),
|
...(relPath && { sub_dir: relPath }),
|
||||||
}
|
}
|
||||||
|
} else if (ext == '.apex') {
|
||||||
|
moduleSpecific = {
|
||||||
|
_type: 'prebuilt_apex',
|
||||||
|
src: moduleSrcPath,
|
||||||
|
prefer: true,
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`File ${entry.srcPath} has unknown extension ${ext}`)
|
throw new Error(`File ${entry.srcPath} has unknown extension ${ext}`)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue