diff options
author | Ulya Trafimovich <skvadrik@google.com> | 2020-09-09 14:08:23 +0100 |
---|---|---|
committer | Ulya Trafimovich <skvadrik@google.com> | 2020-09-10 10:47:41 +0100 |
commit | 54027b572e49c8d17cc686d241878d70c517b969 (patch) | |
tree | 2855e5df0072b43ae1c841878dfbf31955b7f638 /java/java.go | |
parent | 74b00521f8808b620d9e95ce4af2901ec0ab1e27 (diff) |
Replace `is_uses_lib` property with `provides_uses_lib`.
The previous property was boolean-valued and provided only the
information whether the library should be treated as <uses-library>
by Soong. The new property is an optional string, which is the name of
the <uses-library>. The name can be different from the module name, as
in the case of "qcrilhook" module which provides <uses-library>
"com.qualcomm.qcrilhook".
Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I65b68e6f7c420ab9c443a76de4c917d31fcd8c8f
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/java/java.go b/java/java.go index c568ec43d..1a630c792 100644 --- a/java/java.go +++ b/java/java.go @@ -1979,9 +1979,9 @@ 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()) + // A non-SDK library may provide a <uses-library> (the name may be different from the module name). + if lib := proptools.String(j.usesLibraryProperties.Provides_uses_lib); lib != "" { + j.exportedSdkLibs.AddLibraryPath(ctx, lib, j.DexJarBuildPath(), j.DexJarInstallPath()) } j.distFiles = j.GenerateTaggedDistFiles(ctx) |