Merge "Allow non-SDK Java libraries to masquerade as <uses-library>." am: bb3467d297

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1417188

Change-Id: If25aaa0174091e966cc5c6b16063b6486a7b4ab6
This commit is contained in:
Ulyana Trafimovich
2020-09-07 10:23:53 +00:00
committed by Automerger Merge Worker
3 changed files with 16 additions and 11 deletions

View File

@@ -441,6 +441,7 @@ type Module struct {
hiddenAPI
dexer
dexpreopter
usesLibrary
linter
// list of the xref extraction files
@@ -456,6 +457,7 @@ func (j *Module) addHostProperties() {
j.AddProperties(
&j.properties,
&j.protoProperties,
&j.usesLibraryProperties,
)
}
@@ -1980,6 +1982,11 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// added to the Android manifest.
j.exportedSdkLibs.MaybeAddLibraryPath(ctx, j.OptionalImplicitSdkLibrary(), j.DexJarBuildPath(), j.DexJarInstallPath())
// If this is a non-SDK uses-library, export itself.
if proptools.Bool(j.usesLibraryProperties.Is_uses_lib) {
j.exportedSdkLibs.AddLibraryPath(ctx, ctx.ModuleName(), j.DexJarBuildPath(), j.DexJarInstallPath())
}
j.distFiles = j.GenerateTaggedDistFiles(ctx)
}