diff options
| author | 2020-05-28 00:19:53 +0900 | |
|---|---|---|
| committer | 2020-05-29 09:15:09 +0100 | |
| commit | 27fc414b84505a0e9d73606ed3ba807555018071 (patch) | |
| tree | ee45734b8856f8201050cd79fc196f0da78ff3a2 /python/python_test.go | |
| parent | ed50ca8dd8806e957a42751ebac83ebe57805ab8 (diff) | |
Add default_to_stubs option to java_sdk_library
Previously, when a lib that doesn't have sdk_version property set
depends on a java_sdk_library, the impl library was used for linking.
This might be too permissive because the client lib might be using empty
sdk_version because it needed some private APIs from the platform, but
not from the java_sdk_library. This actually happend for some of the CTS
tests. They don't set sdk_version, but were directly depending on
android.test.[base|runner|mock].stubs libraries. If we switch the
references to the stub libraries into the corresponding java_sdk_library
modules (e.g. aandroid.test.[base|runner|mock]), then we would be
allowing private APIs to the CTS tests, which is not good.
To solve this problem, default_to_stub property is introduced. It when set
to true prevents the impl lib from being used for linking. When a module
that doesn't have sdk_version depends on it, the widest API surface that
the java_sdk_library provides is linked instead.
Bug: 157007292
Test: m
Merged-In: Id2acc3cafb71d1e90d4fdc9c0c70a73983355e0f
Change-Id: Id2acc3cafb71d1e90d4fdc9c0c70a73983355e0f
(cherry picked from commit 932cdfeb062032b98e237a005a634446a23acd19)
Diffstat (limited to 'python/python_test.go')
0 files changed, 0 insertions, 0 deletions