diff options
Diffstat (limited to 'java/aar.go')
-rw-r--r-- | java/aar.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/java/aar.go b/java/aar.go index 66f1cab6..ca936847 100644 --- a/java/aar.go +++ b/java/aar.go @@ -147,7 +147,7 @@ func (a *aapt) aapt2Flags(ctx android.ModuleContext, sdkVersion string) (flags [ if !hasVersionName { var versionName string - if ctx.ModuleName() == "framework-res" { + if ctx.ModuleName() == "framework-res" || ctx.ModuleName() == "org.lineageos.platform-res" { // Some builds set AppsDefaultVersionName() to include the build number ("O-123456"). aapt2 copies the // version name of framework-res into app manifests as compileSdkVersionCodename, which confuses things // if it contains the build number. Use the PlatformVersionName instead. @@ -168,6 +168,9 @@ func (a *aapt) deps(ctx android.BottomUpMutatorContext, sdkVersion string) { if sdkDep.frameworkResModule != "" { ctx.AddDependency(ctx.Module(), frameworkResTag, sdkDep.frameworkResModule) } + if sdkDep.lineageResModule != "" { + ctx.AddDependency(ctx.Module(), lineageResTag, sdkDep.lineageResModule) + } } } @@ -224,7 +227,7 @@ func aaptLibs(ctx android.ModuleContext, sdkVersion string) (transitiveStaticLib } switch ctx.OtherModuleDependencyTag(module) { - case libTag, frameworkResTag: + case libTag, frameworkResTag, lineageResTag: if exportPackage != nil { sharedLibs = append(sharedLibs, exportPackage) } @@ -386,6 +389,9 @@ func (a *AARImport) DepsMutator(ctx android.BottomUpMutatorContext) { if sdkDep.useModule && sdkDep.frameworkResModule != "" { ctx.AddDependency(ctx.Module(), frameworkResTag, sdkDep.frameworkResModule) } + if sdkDep.useModule && sdkDep.lineageResModule != "" { + ctx.AddDependency(ctx.Module(), lineageResTag, sdkDep.lineageResModule) + } } ctx.AddDependency(ctx.Module(), libTag, a.properties.Libs...) |