Retry: "java_sdk_library: Control shared library use"
Previously, all java_sdk_library instances were assumed to be usable as shared libraries, i.e. referenced from <uses-library> in Android manifest. However, that was not true for any instances that specified api_only: true and will not be true for many of the new Android modules. One consequence of this assumption is that use of one of the api_only instances could (but fortunately does not appear to) have lead to an invalid library being referenced in an app's manifest which would prevent the app from loading. That would have been done automatically by the implicit sdk library tracking and manifest fixing mechanism and there would have been nothing a developer could have done about it. Changes: 1) Prevents api_only instances from participating in the automatic tracking which will prevent them from being added to Android manifests and breaking apps. 2) Add a new shared_library property that can have the same effect as api_only while still creating a runtime implementation library. 3) Renamed commonProperties to commonSdkLibraryProperties to disambiguate it from the ModuleBase.commonProperties field. 4) Extracts requiresRuntimeImplementationLibrary() to remove duplicate code accessing the Api_only property. 5) Tests for the api_only and shared_library behaviours. Test: m nothing - added tests, tests broke, fixed code, tests passed. Bug: 156723295 (cherry picked from commit dfa131e6) Change-Id: I06b3444ced00fd7b54068352187684171024c679
Loading
Please register or sign in to comment