From fab307dae85770cefe875328f0f24948cda6779e Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sun, 19 Dec 2021 02:56:13 -0800 Subject: [PATCH] overlays: Fix RRO generation with multiple target configs + same package --- src/blobs/overlays.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/blobs/overlays.ts b/src/blobs/overlays.ts index a417dd1..6b7b085 100644 --- a/src/blobs/overlays.ts +++ b/src/blobs/overlays.ts @@ -398,7 +398,8 @@ export async function serializePartOverlays(partValues: PartResValues, overlaysD // Now serialize each (package,target)-partition combination for (let [pkgNameKey, values] of pkgValues.entries()) { let [targetPkg, targetName] = pkgNameKey.split('/') - let rroName = `${targetPkg}.auto_generated_rro_${partition}_adevtool__` + let genTarget = pkgNameKey.replace('/', '__') + let rroName = `${genTarget}.auto_generated_rro_${partition}_adevtool__` let bp = serializeBlueprint({ modules: [{ @@ -456,7 +457,7 @@ export async function serializePartOverlays(partValues: PartResValues, overlaysD let valuesXml = serializeXmlObject(valuesObj) // Write files - let overlayDir = `${overlaysDir}/${partition}_${targetPkg}` + let overlayDir = `${overlaysDir}/${partition}_${genTarget}` let resDir = `${overlayDir}/res/values` await fs.mkdir(resDir, { recursive: true }) await fs.writeFile(`${overlayDir}/Android.bp`, bp)