diff options
author | 2021-08-18 16:57:11 +0100 | |
---|---|---|
committer | 2021-08-18 16:57:11 +0100 | |
commit | e4432874a9bc69b4f54a0cab1e7df8f1d57432d0 (patch) | |
tree | d578e7b4b6e36364e5b47194a9d3b0868030db89 /java/sdk_library_test.go | |
parent | 3931b8c70d1f77462be44e1d052984850150618e (diff) |
Propagate <uses-library> dependencies from `java_library` to apps.
Automatically add `uses_libs`/`optional_uses_libs` properties specified
in `java_library` modules to the apps that transitively depend on these
libraries.
Note that a library may choose to specify its <uses-library> deps as
either optional or required. If this is not the right choice for an app,
it should be able to override it by specifying its own `uses_libs`/
`optional_uses_libs` properties.
Add Soong tests to cover the new cases.
Bug: 196377222
Test: lunch aosp_cf_x86_64_phone-userdebug && m
Change-Id: I601f3e2830ed9699b78d911966ee70812d32b4f6
Diffstat (limited to 'java/sdk_library_test.go')
-rw-r--r-- | java/sdk_library_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/sdk_library_test.go b/java/sdk_library_test.go index eeec50482..938bb2895 100644 --- a/java/sdk_library_test.go +++ b/java/sdk_library_test.go @@ -157,7 +157,7 @@ func TestJavaSdkLibrary(t *testing.T) { qux := result.ModuleForTests("qux", "android_common") if quxLib, ok := qux.Module().(*Library); ok { requiredSdkLibs, optionalSdkLibs := quxLib.ClassLoaderContexts().UsesLibs() - android.AssertDeepEquals(t, "qux exports (required)", []string{"foo", "bar", "fred", "quuz"}, requiredSdkLibs) + android.AssertDeepEquals(t, "qux exports (required)", []string{"fred", "quuz", "foo", "bar"}, requiredSdkLibs) android.AssertDeepEquals(t, "qux exports (optional)", []string{}, optionalSdkLibs) } } |