The aidl files are allowed when creating the droiddoc module in
java_sdk_library. But The properties of AIDL, local_include_dir
and include_dir, are not passed to the droiddoc module.
These properties are add because they are needed to generate the
java files.
Bug: 77575606
Test: build && java_test.go
Change-Id: I1006c9ce7a5c7e424416d39fb921c27a3fa86afa
droiddoc now supports apicheck. java_sdk_library uses it to
automatically perform apichecks against the not-yet-release API and
the latest-released API.
A module type prebuilt_apis is added. It finds api txt files and creates
filegroup modules so that it can be referenced from java_sdk_library
across the module boundary.
Bug: 77575606
Test: m -j
Test: m -j checkapi
Test: m -j update-api
Change-Id: I0ba859972eac060296e1df2e71c4e047392d4877
I3487634f1ec5bb3b5b60d636b64461d391add35a is causing build breakages in
unbundled builds.
The stubs libs are disabled for unbundled builds, and thus we shouldn't
declare them as dist artifacts.
Bug: 605033
Test: make -j dist ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: I3cd92e2cc6aeb48baf47d37780d8df2aa4756438
stubs libs from a java_sdk_library are automatically registered as dist
artifacts for sdk and win_sdk targets.
They are installed under $(DIST_DIR)/apistubs/<apiscope>/<name>.jar
where <apiscope> can be public, system and test.
Bug: 605033
Test: m -j
Test: choosecombo 1 sdk_phone_armv7 userdebug; m -j sdk dist
the stubs libs are found under out/dist/apistubs
Change-Id: I3487634f1ec5bb3b5b60d636b64461d391add35a
New property api_srcs is added to java_sdk_library. The property is used
to specify set of source files that will be part of the API but not part
of the runtime library. Currently, this is only for the legacy http
library (org.apache.http.legacy) where some framework classes (such as
android.net.SslError which are compiled into framework.jar) are
registered as its API for historical reason.
Bug: 77575606
Test: m -j
Change-Id: I36d153f4815f8e4c939d5eeec632a38e7943b4b0
java_sdk_library now accepts properties in CompilerDeviceProperties,
such as dex_preopt.profile. The properties are passed to the impl
library which is the device-specific sub-component of a
java_sdk_library.
Bug: 77575606
Test: m -j
Change-Id: I7303068bb62ca860352db306a5462fa4453ee80f
hidden_api_packages is used to set packages that must be hidden from the
API. org.apache.http.legacy will be using this to exclude
references to com.android.okhttp from its API signatures.
Bug: 77575606
Test: m -j
Change-Id: Ic93c67cab96585638921dc922f175e545a68ead2
The stubs will always fail to build without at least these
three arguments. Give a clear error message when this happens
instead of failing further into the build.
Bug: 77575606
Test: make <x>.stubs for sdk_library "x" without these args
Change-Id: If3142ecc73d6428f7e3120788f8de64d56a777ad
For each java_sdk_library module, three (possibly different) stubs libs
are created.
*.stubs: public APIs only
*.system.stubs: public APIs + @SystemApi
*.test.stubs: public APIs + @TestApi
Depending on the sdk_version (or LOCAL_SDK_VERSION) of the calling
module, stubs lib of the corresponding api scope is linked.
Bug: 77575606
Test: m -j
Change-Id: I1437c64460914dbfc349dbc31d6f3ef090f541e3
prebuilt_etc_xml installs an xml file to <partition>/etc[/<subdir>] and
validates the xml file against the given DTD file before installing it.
This change also includes some fixes for prebuilt_etc which is the super
module of prebuilt_etc_xml:
1) The module is changed to arch-specific module as the prebuilts are only
for devices (installed under the etc dir), but not for hosts.
2) Dependency to android.Prebuilt is removed because android.Prebuilt is
intended to be used for the case when a module can exist as prebuilts,
source or both. These prebuilt_etc_* modules are prebuilt only.
3) srcs property which accepts a list of source files is changed to src
that only accepts single source file, which makes more sense for
prebuilts.
Bug: 65686190
Test: m -j (xml_test.go)
Change-Id: I40484f3f6615b99f6b8d43176db0c40c5bfd838e
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
java_sdk_library is to make a Java library that implements optional
SDK APIs to apps. It is actually a wrapper for several modules: 1) stubs
library that clients are linked against to, 2) droiddoc module that
internally generates API stubs source files, 3) the real runtime shared
library that implements the API, and 4) XML file for adding the runtime
lib to the classpath at runtime if requested via <uses-library>.
Note: this is only the initial CL for the feature. Followings are features
currently missing and under development.
1) check for API consistency
2) install stubs libs as the dist artifacts
3) ensuring that apps have appropriate <uses-library> tag
4) disallowing linking to the runtime shared lib
5) HTML generation
Bug: 77575606
Test: m -j
Change-Id: I4a4ccf6e730e041703c63bb275d8860d0de96887