From a7628cccb3e01be732dca53c29c17b5fc357a99f Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sun, 7 Nov 2021 04:48:44 -0800 Subject: [PATCH] soong: Add prebuilt APEX support --- src/build/soong.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/build/soong.ts b/src/build/soong.ts index af4cf27..451680b 100644 --- a/src/build/soong.ts +++ b/src/build/soong.ts @@ -1,4 +1,3 @@ -import * as path from 'path' import * as util from 'util' import { BlobEntry, partPathToSrcPath } from '../blobs/entry' @@ -43,6 +42,11 @@ export interface ApkModule { } } +export interface ApexModule { + src: string + prefer: boolean +} + export interface JarModule { jars: Array } @@ -66,6 +70,7 @@ export type SoongModuleSpecific = { ExecutableModule | ScriptModule | ApkModule | + ApexModule | JarModule | EtcXmlModule | DspModule @@ -211,6 +216,12 @@ export function blobToSoongModule( filename_from_src: true, ...(relPath && { sub_dir: relPath }), } + } else if (ext == '.apex') { + moduleSpecific = { + _type: 'prebuilt_apex', + src: moduleSrcPath, + prefer: true, + } } else { throw new Error(`File ${entry.srcPath} has unknown extension ${ext}`) }