Flag for java_library modules to build just the Turbine headers and
skip building an impl jar.
Test: go test java
Bug: 289776578
Change-Id: Iad0babf951710476bc32df93c25d17065a14ab84
Add a property to export proguard flags files for libs dependencies.
Currently only proguard flags files from static deps are propagated up
to reverse dependencies, but it is necessary sometimes to have flags
from libs dependencies also be propagated.
Bug: 289087274
Test: go test ./java
Change-Id: Ic0aa22b086792bf322041aa5780db6c4f4eb2770
`Previous_api` is used to migrate nullness information in metalava (i.e.
convert @Nullable and @NonNull to @RecentlyNullable and @RecentlyNonNull
for some methods). The input is required to generate loosely equivalent
from-text stubs.
Test: m && compare nullness annotations between from-source stubs and from-text stubs
Bug: 293962901
Change-Id: Ic7a0868415fdb2c65d0d472e527fe73280b7651d
This change enables scopeOrderedSourceFileNames to be not computed
everytime when the function is called, but instead is computed once.
Test: m
Bug: 295429988
Change-Id: I33846cdb7a750e44e45049dbd342aa6ab8b70c4c
Recent changes in metalava (aosp/2704325) enforces api files passed as
inputs to generate stubs from txt to be sorted in the order from the
narrower api scope to the wider api scope. In order to comply with this
change, all api files passed as inputs to metalava invocations need to
be sorted in the respective order.
Test: m out/soong/.intermediates/packages/modules/IPsec/tests/cts/CtsIkeTestCases/android_common/e10894d3da5db41239526c9048962355/javac/CtsIkeTestCases.jar --build-from-text-stub --skip-soong-tests (Failing module from incorrect class hierarchy when building from text stub)
Bug: 295429988
Change-Id: I1eb1f4bf8fa34fd7dc8a0e4c04aa056258a975c5
`-encoding` and `-source` have been deprecated in metalava.
`-encoding` actually does nothing apart from check to make sure that
the value is `utf-8` (in some case). Metalava always uses `utf-8`.
`-source` has been deprecated in favor of `--java-source` as metalava
also can consume kotlin and it has its own `--kotlin-source` option.
Bug: 295136054
Test: ./gradlew
Change-Id: I08e6931958f40022d65d417360e32b72a1d70444
The R.Java files generated by aapt2 link --no-static-lib-packages
cause scaling problems by combining all resources into every package
listed in a dependencies' AndroidManifest.xml file. For SystemUI-core
this results in 74 R.java files, each with 76k lines, and takes 20
seconds to compile in javac.
Both AGP and Bazel have workarounds for this that avoid using the
R.java files generated by aapt2, instead generating more efficient
R.class files directly based on the R.txt file.
Bazel uses the ResourceProcessorBusyBox tool that is already present
in our tree to process the resources. Reuse the same tool in Soong
to create the R.jar.
The more efficient R.class files require modifiying source files
that use incorrect packages to refer to resources.
Bug: 284023594
Test: TestAndroidResourceProcessor
Change-Id: I026073b40dabcfdb10e5d7a52e9348205b0e9a66
Merged-In: I026073b40dabcfdb10e5d7a52e9348205b0e9a66
This is prep work to add additional special handling for genrule
generated headers as there will be similar partitioning for those
headers.
Test: go test soong tests
Change-Id: Ib63e7e4f7554b2b7b7bc78b2825b20c05403216a
Currently, java_library.stem property is not correctly reflected in the
output jar name in java_library when the module specifies
java_resource_dirs property. This change fixes the unexpected behavior
so that setting the stem property behaves as expected.
Test: go test ./java && m
Bug: 285843207
Change-Id: I0941fcea83c92f4c42ae415aa6ad9125da5cf57b
The Java compiler may generate sources when processing annotations.
These sources are currently not included in the IDE project model, which
results in unresolved symbols when using Hilt and other annotation
processors. These sources are not passed to the Java compiler for
compilation, so they cannot be handled like other Java module sources.
This change archives the generated sources and appends them to the
existing srcjar list in module_bp_java_deps.json.
Test: go test .
Test: Verified that module_bp_java_deps.json contained srcjar entry
Test: with path/to/android_common/javac/anno.srcjar.
Test: Verified that IntelliJ can resolve generated symbols after
Test: invoking aidegen.
Change-Id: I6a3011f9140fd25f785178baee0cd6074ad94600
metalava no longer prints an ASCII banner, and has removed its
--no-banner argument. Update all call sites accordingly.
Test: presubmit
Bug: 286023667
Change-Id: I61cf5f1125dfbd93496e6a59eb1ea62886b32046
Currently, stub java files are extracted from srcjar file provided from
dep_api_srcs in java_api_library module generated in java_sdk_library
per api scope. However, compiling the java files may lead to difference
in the content of the generated class files even if the stub java files
are equivalent, as javac may arbitrarily add overridden methods. Thus,
create a stub jar file instead of creating a stub srcjar file and
compiling it, in order to guarantee stub jar files content equivalence
and thus enable hiddenapi during from-text stub build.
Note that this change does not fully resolve differences between the
full api surface csv and the per sdk_library csv. Instead, it removes
the difference caused by methods arbitrarily added by javac.
This change also renames dep_api_srcs to full_api_surface_stubs to be
more intuitive.
Test: rebase on top of aosp/2617274 and `m --build-from-text-stub`
Bug: 275570206
Change-Id: I22b6d56624633681f5c3b000370b5782655c7b8d
Use Go's generics for DepSets so they don't require a type-specific
wrapper and reflection.
Test: depsets_test.go
Change-Id: I22ba0b7d680d37d2cd05230b0f560d166c4dd20b
Since the name of the java_library generated from sdk_library per api
scope does not depend on the build configuration anymore, all
dependency switching "magic" via android.JavaApiLibraryName() can be
removed.
This change also removes from-text-build-specific test cases, as those
test cases depend on build configurations.
Test: m nothing && m nothing --build-from-text-stub
Bug: 287340610
Change-Id: I3bac35259e0cbaa16432a46cb2b128951c9bc075
Also add unit tests for the rest of device_config
Bug: 283475679
Test: m nothing (soong unit tests)
Change-Id: Iee18a1f2f2cbb23e8c8d84c54e903b32be29a693
To support stem, cc libraries will be generated in
<pacakge_name>/<label.name>. Update RUNPATH of java binaries so that it
can find its jni deps
Test: bp2build
Test: TH
Bug: 240563612
Change-Id: Ia2f70f0424a8526ee35856225c1a8cd1067a8570
In Soong, java libraries can use src files generated from xsd_config. In
Bazel, instead of providing srcs, java_xsd_config_library will provide a
jar. Update bp2build so that all src references to xsd_config modules in
srcs get routed to deps and exports attributes
This CL creates an interface in build/soong/android to get around a
circular dependency issue. The bp2build logic needs to exist in
soong-java, but soong-java does have soong-xsdc in its package path. Use
the interface and type assertions to special case xsd_config references
Bug: 211678537
Test: bp2build test in sibling CL in system/tools/xsdc
Change-Id: Ida924bb20b1fd7eb8beeef950b070d37a9c6f3b5
Previously, `--api-overloaded-method-order source` was the default if
that option was not specified but the other change in this topic is
switching it to `--api-overloaded-method-order signature` to match the
behavior in AndroidX. This change explicitly specifies the option
needed by Soong's use of metalava.
Bug: 285140653
Test: m checkapi
Change-Id: I00e049e0d991e650ab9940a3d495ed2b6e7480f8
Previously, `--api-class-resolution api` was the default if that option
was not specified but the other change in this topic is switching it to
`--api-class-resolution api:classpath` to match the behavior in
AndroidX. This change explicitly specifies the option needed by Soong's
use of metalava.
Bug: 285140653
Test: m checkapi
Change-Id: Ief3c7f9dfdfa946f21cb048a579ec90309fb350f
java_api_library currently emits error based when the
java_api_contribution module has an empty api file or when the module
does not have any api files. This may be problematic in partial
manifests where allow missing dependency is set, thus add this condition
for error emission.
Test: go test ./java
Bug: 284212875
Change-Id: I10b4baa5723e7a53d931823b3029ea20ac731911
(cherry picked from commit fdf043a7b1)
Test: built fuzz targets locally and tested them with Jazzer
Change-Id: I3ff487ba4e34289e0f53f2077463f524f4bf4f11
The purpose of this change is to enable filegroups to be taken as inputs
for `java_api_library` module `api_files` property. However, since
android.MaybeExistentPathForSource() does not support this, it needs to
be replaced with android.PathForModuleSrc(), which checks for the files'
existence.
Bug: 283006953
Test: go test ./java
Change-Id: I8a7d7f200f900219cc17243194a4c26071329ee6
Although paths to resource files in a Bazel java_library should be
relative to the package, the directory structure in the resulting jar
will have resources under the full path from the top-level of the
workspace, e.g. if a library in "a/BUILD" has java_resouces as
"res/res.txt" then by default the res.txt file would appear under
"a/res/res.txt".
Fix this by adding a resource_strip_prefix in that case.
Test: Unit tests
Change-Id: If4325126f5c19a2a8fb83ee09bc3a95a18673fe3
Instead of exporting it to soong_injection.
Bug: 279095899
Test: m nothing
Change-Id: I7b93af233b7450848a475512b5f5682ece773c09
Merged-In: I7b93af233b7450848a475512b5f5682ece773c09
Soong does not enforce apex_available on the contents of test apex. To
prevent special-casing test apexes in the apex validation aspect in
Bazel, drop the test apexes from the tags altogether.
( The core problem I am trying to solve is making sure that stub
libraries in Bazel have a single apex available. apex validation happens
to be a nice side benefit)
Bug: 277651159
Test: go test ./bp2build
Change-Id: Ibb3cfedb5c0f2cda0464bf3758c70b67cb5885d1
This CL adds java_version and sdk_version support to bp2build
converters for
- java library
- java binary
- android library
- android binary
- android library import
Although java import doesn't support java_version and sdk_version, the
neverlink java_library wrapper around a java_import must specify a
sdk_version when targetting a device. "none" is used by convention.
Change-Id: I22a69dea2e351858368df69ed6a703b568d613ea
Bug: 215230098
Test: Presubmits
Use JavaApiLibraryName function to redirect the usage
of core platform api stubs from .txt files based on config.
Test: m --build-from-text-stub
Change-Id: I926a0a455fed301ba4ff9dfa509d4dbbbd076029
The full api surface java_api_library modules are currently defined as
java_library modules instead of java_api_library modules. This change
corrects this and modifies the DepsInfo of java_api_library so that it
can be compatible in tests.
Test: go ./java
Change-Id: I540b5a930f506ce5f7663ab6e07c6df49af15cf9
Users can pass the jar-file creating module via dep_api_srcs property in
java_api_library to create the jar file not by compiling the stubs
generated from metalava but by extracting and zipping the class files
from the jar file of the input module.
Test: m android-non-updatable.stubs.from-text
Bug: 273381329
Change-Id: Id1b75179111cc7ff45faaff58388db1347bb18e5
Context
- from-text android.jar files are built using Metalava, and these can be
utilized in `decodeSdkDep` so that any modules that depends on APIs
can be compiled using from-text android.jars
- This change removes dependency on source java files when compiling
stub android.jar files
Implementation
- Modify java_api_library module to create system modules using the
generated android.jar
- Replace modules in decodeSdkDep to link against java_api_library
modules
- Add --build-from-text-stub flag to hide the feature behind a flag
Test: m --build-from-text-stub
Bug: 271154441
Change-Id: I104df595edc65c0006820d5ae5b15f1fb167e190
Although stubs are not installable on device, we need to compile .dex to
support hiddenapi metadata generation.
Bug: 271443071
Test: Built out/soong/hiddenapi/hiddenapi-stub-flags.txt with
aosp/2487266
(There is still some delta due to missing signatures in child classes)
(Will address them in a followup CL)
Change-Id: Iac1330c449934085a479c487a1489aa1695a75ee
Change-Id: I1baa9c0f45eb8fc93f5c3177389ea5a2b7ca0a0b
max_sdk_version signifies device version and does not need an sdkKind to
describe it fully. Update the type and cleanup existing usages. As a
side benefit, we also get better error handling since users can no
longer enter something like `public_30` as a valid max_sdk_version in bp
files
Bug: 208456999
Test: no change in ninja file (this should be a no-op)
Test: TH
Change-Id: I304b5ad802bde200137d8e225182828dfd6f7227
target_sdk_version signifies device version and does not need an sdkKind to
describe it fully. Update the type and cleanup existing usages. As a
side benefit, we also get better error handling since users can no
longer enter something like `public_30` as a valid target_sdk_version in bp
files
Test: m nothing
Test: no change in ninja files (this should be a no-op)
Bug: 208456999
Change-Id: I3c19245e29184bd9e5660ad8981966f64dfa9424
This relands aosp/2457063. The original change broke T and U since those
branches still contain soong modules of type (kind+level). Those soong
modules have been cleaned up now
Test: Used go/abtd to test T and U branches with this change
Bug: 208456999
Change-Id: I0ef7933c055f88cb512a02108f1173e51156ef1c
min_sdk_version signifies device version and does not need an sdkKind to
describe it fully. Update the type and cleanup existing usages. As a
side benefit, we also get better error handling since users can no
longer enter something like `public_30` as a valid min_sdk_version in bp
files
Will do a similar cleanup for targetSdkVersion and maxSdkVersion in a
followup CL
Test: m nothing
Test: no change in ninja files (this should be a no-op)
Bug: 208456999
Change-Id: Ie6ae7e267d093c5e4787e82685daaca1021d202e
Prevents inconsistent load locations from being added for java_library,
android_library, kt_jvm_library targets that are generated in multiple
places.
Change-Id: I66ae5af137d7dff3f6fa6660dee539cf9ab22b9e
Test: go test ./bp2build
for java_library, java_binary, android_app & android_library
Change-Id: Ia8dec7e7d497eb41b2d8dcd8c44c3090d1d3b4bd
Bug: 271265771
Test: go test ./bp2build
load statements will all now point to rules.bzl files and won't have to
be constantly updated.
Bug: 271612705
Test: CI
Change-Id: I663b9730f1b5b333682ea301ce4d9a505626faaa
makes it clearer which attributes are kotlin specific
embedded within javaCommonAttributes since both
java_* and android_* use kotlin.
Change-Id: Ib7c9b912a9901cd1c3d150ab1e0a79011d8e07de
Test: go test ./bp2build
there is now support for resoure_strip_prefix in kt_jvm_library targets.
Test: built AnalyzerKt and updated go ./bp2build tests
Change-Id: I4a6fe45276d45519186b6f40a02db990511d6def
change load locations for kt_jvm_library to be the macro
Change-Id: Id50fcb1f880013fe57647a065cd6b7149d7c5d91
Test: built kotlinx_coroutines locally and compared jar file to soong
Bug: 268519061
When generating framework.aidl, `android_*_stubs_current` are converted
to .aidl files (and created as targets) by replacing the extension from
`.jar` to `.aidl`.
Thus, when replacing `android_*_stubs_current` to java_api_library
modules, generating `android.jar` files leads to ninja error(multiple
rules for generating */android.aidl error).
Prevent this error by renaming the name of the artifact jar file as the
module name so that distinct-named ninja targets can be created.
Test: m
Change-Id: Iaa7248996d7bf5e7f98e1d1e2919870c3cccf5a6
The type of min_sdk_version is being migrated from
android.SdkSpec(kind+level) to android.ApiLevel(level). This affects
`ShouldSupportSdkVersion` for java modules. This function skips the
check for modules compiling against `core`, and that requires access to
SdkVersion and not MinSdkVersion after the migration.
Skip the check explicitly using SdkVersion.
Test: go test ./java
Test: No change in ninja file
Bug: 208456999
Change-Id: I14eca4f8e8c5d7477ded00c4fe54097323fab4a2
This reverts commit 7eb9243fa7.
Reason for revert: The original change was reverted since it was suspected to cause missing libc++.so errors. It was a red herring, and the root cause has been fixed now b/264588525
Change-Id: Ib9110c41bacf220b91f24de11589f63235895e56
* changes:
Use the profiles in the APEX to dexpreopt system server jars.
Add tests for the ignored "profile_guided: true" property.
Output dex_preopt to SDK snapshot.
After this change, if "profile_guided: true" is set, profile-guided
compilation will be enabled for the jar and the ".prof" file next to
the jar in the APEX ("javalib/<name>.jar.prof") will be used as the
profile when dexpreopting for the prebuilt APEX.
Bug: 241823638
Test: m nothing
Test: -
1. (on internal master) Patch aosp/2426453.
2. Build the APEX bundle and the module SDK of com.android.wifi
3. (on tm-dev) Patch this CL and aosp/2141972.
4. Copy the APEX bundle and the module SDK built on step 2 to the
source tree
5. Disable hiddenapi check
6. lunch cf_x86_64_phone-userdebug && m MODULE_BUILD_FROM_SOURCE=false com.google.android.wifi
7. cat out/soong/.intermediates/prebuilts/module_sdk/Wifi/current/prebuilt_service-wifi/android_common_com.android.wifi/dexpreopt/oat/x86_64/javalib.invocation
8. See the profile being used.
Change-Id: I55a5a295e9c5d6f0564afb139c5fb7da91ab8cae
This is needed to determine whether we need to deapex the profile or
not.
Bug: 241823638
Test: m nothing
Test: -
1. Patch ag/20582608 PS2.
2. TARGET_BUILD_APPS=com.android.wifi packages/modules/common/build/mainline_modules_sdks.sh
3. See the `dex_preopt` property being written.
Change-Id: I05177388c24be1ab315247ea85e7e3a8600cebd3
Package private stub annotations are not part of any API surfaces, but
are included in the `android_<API_SURFACE_NAME>_stubs_current`. Since
these cannot be included in the java_api_library by api_contributions,
add static_libs property to statically include jars in the output jar
file.
Test: m
Change-Id: Icb4401f29079ba32df4c192943a7e8814599d9ba
This reverts commit 1fbf7f21a4.
Reason for revert: broke docker image, pinning is incomplete it seems
Change-Id: I7102cb233a4fe5ce0f5a1ead98cfc661c3d82ce5
Context
- droidstubs module are either generated from the java_sdk_library
module or defined in the bp files.
- Since droidstubs module contains API text file property,
java_api_contribution module can by dynamically created from
droidstubs.
Implementation
- Add `api_surface` property in droidstubs module. This property is
either inherited from the java_sdk_library or written in the module
definition in the bp file.
- Add defaultable hook in droidstubs module to generate the child
java_api_contribution module.
Test: m
Change-Id: Ica43d65614723c623cd0c155266f9844e69e5d5e
Module Lib API surface takes modules that are not part of the API
surface as classpath during compilation of the JAR file. Thus, add libs
property to add deps in bp module definition.
Test: m
Change-Id: I8967d53430fa4cc8e4aa431770ba4e97893f8c61
The -libraryjars argument to r8 was missing transitive dependencies, and
so complained when there were classes used in the program JAR which were
not provided via libraries. This CL propagates transitive dependencies
to the r8 command to reduce the warnings that are generated for missing classes.
Bug: 242088131
Change-Id: Ifad7bc7c5d406e3de8d98ea963c97e88c84b45a1
Now that libs conversion is happening for the needed module_types,
removing if statement with old hacky libs conversion
Test: Presubmit
Bug: 244210934
Change-Id: I92bb2080eeb7dcb85d087a3ff6054bdf8675ec54
Context
- Some Java API surfaces have subset relationships (i.e. public API
surface is a subset of system API surface). Thus, simply listing
all API files that contributes to hierarchical API surfaces when
defining java_api_library modules can lead to repetition of code in
Android.bp files.
- Utilizing java_defaults can resolve this problem by
grouping java_api_contribution modules by API surfaces, and reduce
code repetition and enhance readability.
Implementation
- Modify java_api_library module to utilize java_defaults modules.
Test: m
Change-Id: I6adead208ca36c21de72ee39c4f532b84af8a153
adds support for *-> android_library and android_library->* edges
Change-Id: I41d4e1d1b8106a17e67951d47e67b59ef3170d17
Test: manually inspected build files for libWallpaperPicker & android-suppor-v4
This reverts commit daa220ae8c.
Reason for revert: Suspected to be a cause for build failure (b/264446640). Will use go/abtd to verify
Change-Id: Ibfdf893f2426b1119923467027e0acedd08808c1
`min_sdk_version` is used to represent the api_level of the device and
its type will eventually become android.ApiLevel. OTOH,
`sdk_version` property represents the API surface a module builds against
_and_ the version of that API surface. For
R8/D8, the additional `--android-platform-build` should be determined
using the sdk_version of the soong module and not min_sdk_version, since
min_sdk_version will not contain information about the api surface used
for compilation.
The unit test for `core_platform_app` in TestR8 were passing since
min_sdk_version was not set, and therefore it implicitly defaulted to
sdk_version.
Also created a custom struct to propagate params to the helper dex
functions
Test: In build/soong, go test ./java
Test: TH
Bug: 208456999
Change-Id: I08ac6f496444d603557e498c8a1794af665abc7a
Some tests need to add custom tradefed options, but still want to
keep most of the soong autogenerated tradefed xml file.
Expose a test_options: { tradefed_options: [...] } property that
will allow tests to add more options to the autogenerated xml file.
Fixes: 184895128
Test: go test, and verified that the ninja files did not change for aosp_arm64
Change-Id: I50d4ad139322e9e207202f1e1a50f5bbb424aa6f
Currently, stubs are compiled with Java version 1.8.
To align with this, set the java version passed to javac invocation as
1.8 for java_api_library module. Helper function is used to sync the
java version of droiddoc module and java_api_library module.
Test: m
Change-Id: I103b94aed9747a2f2dd65d13de0ae9c0f33db5c0
This reverts commit 8ec823cba1.
Reason for revert: DroidMonitor: Potential culprit for Bug b/262965953 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I236cc36981d8b30527ca286632727f8ca267e969
Some tests need to add custom tradefed options, but still want to
keep most of the soong autogenerated tradefed xml file.
Expose a test_options: { tradefed_options: [...] } property that
will allow tests to add more options to the autogenerated xml file.
Fixes: 184895128
Test: go test, and verified that the ninja files did not change for aosp_arm64
Change-Id: I75f7eb002c8325ce7cdc76e12e76e16195320620
java_api_contribution is useful to java_api_library when the api files
are not colocated.
If they are colocated (e.g. in Multi-tree assembled api_surfaces
directory), it is useful to refer to them directly without nedding to
create a java_api_contribution module.
Test: In build/soong, go test ./java
Change-Id: I5b4e557068a1e5c71a80c76452030e72ec83a696
Context
- Create phony rule for java_api_library module with its artifact
(*.jar) as dependency
- Fix source directory base mislinkage issue for input text files passed
from java_api_contributions modules
Test: m
Change-Id: I055332fd5bc7ef0d03e7b311b0efa93f4454102f
The min_sdk_version was added to the java_import in Tiramisu. This
change will propagate the min_sdk_version set on a java_library to the
java_import snapshot. If possible the min_sdk_version will be resolved
into a numerical version to ensure consistent behavior across build
releases.
Bug: 260560424
Test: m nothing
BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdks.sh
# Ran above before and after this change and made sure that only
# Tiramisu, UpsideDownCake and latest were changed and those changes
# were the addition of a min_sdk_version property.
#
# Ran the following command in tm-mainline-prod:
# lunch cf_x86_64_phone-userdebug
# m ART_MODULE_BUILD_FROM_SOURCE=false nothing`.
#
# It failed with:
# module "prebuilt_okhttp-norepackage" variant "android_common": should support min_sdk_version(33) for "AdServicesApk": min_sdk_version is not specified.
#
# Unpacked the Tiramisu art snapshot generated with this change into
# tm-mainline-prod and reran the previous command and it succeeded.
Change-Id: I9d9d730845554fc175d17f38c038e4e3c7d39e07
Context
- Update java_api_library module's prop name from api_providers to
api_contributions to adjust to module rename
- Update variables name correspondingly to enhance readability
Test: m
Change-Id: I93b941a572e04bed6084109d151ba83a82715651
Context
- Droidstubs module is currently responsible not only for java api stubs
generation, but also for checking api equality and compatibility.
- Generating stubs with incomplete api text file that does not list
entire api surface is done through metalava implicitly adding unlisted
methods from java source files to the stubs in droidstubs module.
- These factors make java stubs generation harder to debug, thus
introduce `java_api_contribution` and `java_api_library` modules to make java
api stubs and jar generation more explicit in Android.bp level and
eventually easier to debug.
Implementation
- `java_api_contribution` module is included in api domains' directory and
lists api text file directory to be added to the api surface
- `java_api_library` collects all api text file that forms the api surface
and creates stubs invoking metalava. Generated java stub files are
converted into `.srcjar`, and eventually `.jar` file which is the complete
api surface.
Test: m
Change-Id: I86f097cc8592334a5eaa900cec12764c5fcc09e7