Additional fixes for java_sdk_library
This change fixes several problems found while re-defining some libs using java_sdk_library module type. 1) A phony module whose name is the same as the java_sdk_library name is defined. It is used to support installing the runtime library via PRODUCT_PACKAGES (even when there is no dependency from other modules). 2) A bug that package names whose depth is >= 2 is ignored in droiddoc.srcs_lib_whitelist_pkgs is fixed. A package name foo.bar.baz is now converted to a path foo/bar/baz following the Java convention. 3) A make variable JAVA_SDK_LIBRARIES that is the list of java_sdk_library module names is exported to make. This can be used to distinguish SDK libraries from ordinary libs. 4) When running doclava, some framework sources in the 'android' package and the same packages as the SDK library are automatically added to the sources list. This is required for the case when API class is extending from the framework class. In that case, doclava needs to know whether the base class is hidde nor not. Since that visibility info is encoded as @hide string in the comment, we need source files for the classes, not the compiled ones. Also there are rare cases where part of SDK library is implemented in the framework (e.g. org.apache.http.legacy). In that case, we need framework source to make API stubs, though the sources are not required to build the runtime library. 5) The stubs libs are disabled for PDK builds as well. Bug: 77575606 Test: m -j Change-Id: I360cf15fe5339e46644fb16d0dabe2548aa315f9
Loading
Please register or sign in to comment