Since the jarjar solution was introduced, api_srcs support was
added back to java_sdk_library. Migrate to that.
Aside from the slightly simpler setup, I also noticed the jarjar-version
left some *.uau and *.xml files in the output jar.
Test: diff jar before and after
Change-Id: I9724cce159ea4f1b882505f589a9cfe17a880514
framework-core-sources-for-test-mock has some classes that are outside
of the android.test.mock package. It is necessary just to provide
private APIs to the mock classes, but not to include them in the impl
library.
Removing the unnecessary classes by using jarjar.
Bug: 199529199
Test: m
Change-Id: I4d0de6132245c4923a4b17a4004c300cd864c116
dist_group replaces owner and the default is going to change, set it
to the current default "android" for frameworks/base java_sdk_libraries.
Bug: 186723288
Test: m checkbuild
Change-Id: I1526853951bcffbe5c5aec6fbc6ba8e0dbea95ad
Merged-In: I1526853951bcffbe5c5aec6fbc6ba8e0dbea95ad
This allows soong to infer the package of the given srcs, which in turns
make it able to filter the inputs to metalava to exclude unwanted
packages.
This is part of a larger topic of changes intended to remove undesired
classes from the public documentation.
Bug: 187386774
Test: m
Change-Id: I8196c306b743ce6ca8a6452d212f3d7c0b5b2b82
These annotations have been relocated to frameworks/libs/modules-utils.
This CL removes the files and updates necessary build rules.
Bug: 183133670
Test: TH
Merged-In: I024252070bd806d50d54377190fdc5cd5b4445e1
Change-Id: I834b9f5320e0b6fe8cb9feb7194c82085b805e07
The java_sdk_library modules are now added with 'default_to_stubs: true'
so that their impl libraries are not used even when the clients don't
have sdk_version property set.
This will allow us to replace the direct references to the stub
libraries of the java_sdk_library modules with the references to the
modules themselves (e.g. android.test.base.stubs -> android.test.base)
in many of the CTS tests without unintentionally exposing the private
APIs in the impl lib.
As part of the change, MockContentProvider.getIContentProviderBinder()
now returns an anonymous Binder object instead of throwing an exception.
This is to eliminate the need for clients to override the now
inaccessible method to escape from the exception.
Also, InstrumentationTestRunner.addTestListener method is added to the
stub because it is used by several tests (MtpServiceTests, etc.)
Bug: 157007292
Test: m
Merged-In: I14cf217f21fd3534c920c3a6336cf2d14c02e60c
(cherry picked from commit b4e458d1063a3ece9a7f539ed6dbaeb6fb9c495d)
Change-Id: I14cf217f21fd3534c920c3a6336cf2d14c02e60c
It generally shouldn't be depended on. Only by droidstubs for
modules.
Bug: 137191822
Bug: 149906971
Test: m
Change-Id: I16e672aaae80d8bcce25e46c34984797740aae1b
Merged-In: I16e672aaae80d8bcce25e46c34984797740aae1b
(cherry picked from commit 6fb18bbfdb99d9a21c499611d87d09f4988c00f2)
android.test.mock is built with its own sources plus a small number of
framework sources that provides private APIs that the library's APIs
have references to. Previously, it was built with the entire framework
sources which is too many and should have slowed the build performance.
Bug: 141149570
Test: m
Change-Id: I165ffdfc053a71b323ef7058651d5908df06870f
This change fixes a regression that java_sdk_libraries under
frameworks/base were built with all framework sources.
Bug: 141149570
Test: m
Change-Id: Iea1d2ae20ca1c5b514a52d8b2a22e8a1d7543efd
This change fixes a problem that entire framework source files are given
to metalava even when many of the source files are not for public. Using
the new property filter_packages, only source files that belongs to the
public packages are given to metalava.
This CL also changes the name of the filegroup 'framework-srcs' to
'framework-non-updatable-sources' to better describe its contents. In
addition, a build-time only library 'framework-all' is introduced. This
library produces a header jar for all framework sources for both
non-updatable and updatable parts. It is put to the classpath when
invoking metalava to give information on the hidden classes that were
filtered-out.
Bug: 140764681
Test: m
Change-Id: I6e16679109ac07820e35037754d4327442c014f2
droiddoc modules for the SDK API documentation and stubs library
generations have depended on the 'framework' (which was recently changed
to framework-minus-apex' module to get the list of Java source files to
be processed.
This however caused a circular dependency when we tried to modularize
some classes in the framework library as a separate library. The
separate java library depended on the stubs library (because it should
only use SDK APIs) and the stubs library depended on the framework
library. The framework library itself depended on the separated library
(or its stub) to use APIs from the separated library, thus forming a
circular dependency.
This change fixes the problem by directly giving the framework source
files via a filegroup `framework-sources-to-document` where all Java
and AIDL files that are to be documented are included in.
This change also put the generated R.java and Manifest.java files from
framework-res into the filegroup for framework sources.
Bug: 70046217
Bug: 135922046
Test: m
Exempt-From-Owner-Approval: Approved internally
Merged-In: I09ad88da47540d31ad089aad5e1151a4b6877ec2
(cherry picked from commit 20426538f85098552f52dffb40d0f7ffff7946d4)
Change-Id: I09ad88da47540d31ad089aad5e1151a4b6877ec2
Java and AIDL source files under frameworks/base are now modularized
using filegroup. Each filegroup has 'path' property set to the base
directory of the ssource files. This allows us to not rely on
aidl.[local_]include_dirs and srcs_lib_whitelist_dirs to get the base
directories.
Bug: 70046217
Test: m
Exempt-From-Owner-Approval: Approved internally
Merged-In: I0705ddf76b3c628127f65d75e0a8b06c6c250fe2
(cherry picked from commit b360931bf0f2d011dada18762829c0d0e47c54b6)
Change-Id: I0705ddf76b3c628127f65d75e0a8b06c6c250fe2
Fixes up the android.test.legacy target to stop using sources directly
now that the issue with android.test.runner-minus-junit not being able
to be built against the SDK has been resolved.
Also, fixes a couple of comments.
This reverts commit 7d7af10dc9057a49c617c7c97c174e8b4ec5008c.
Reason for revert: When this was originally applied it broke the
pi-dev-plus-aosp branch as it contained references to these targets.
Those references have now been removed.
Bug: 63127064
Change-Id: I619e92faf4cc38f8fd4f053bde832e9a76a2a2bf
Test: make checkbuild
Fixes up the android.test.legacy target to stop using sources directly
now that the issue with android.test.runner-minus-junit not being able
to be built against the SDK has been resolved.
Also, fixes a couple of comments.
Bug: 63127064
Test: make checkbuild
Change-Id: If38fa0d87b36343896e97efb2269ac070810db84
The impl lib name of java_sdk_library is changed to {module_name}.jar
instead of {module_name}.impl.jar
android.test.mock.impl is removed from stubs_defaults.
RepetitiveTest class is added to public API in android.test.base
Bug: 110404779
Test: m -j
Change-Id: I5dd7f3a28bc22136b4e921de3eb5a3e77e5fc75f
Merged-In: I5dd7f3a28bc22136b4e921de3eb5a3e77e5fc75f
(cherry picked from commit b7540bf1a3f7e7f041ea8b3d3a3a23b15cab187c)
android.test.mock, com.android.location.provider and
com.android.mediadrm.signer libraries are change to using metalava
instead of doclava.
Test: m -j
Bug: 117127012
Change-Id: I82e838ab60110698e1c0ea8e567467a1b32707ce
The new property is added for supporting metalava. But some sdk library
cannot use metalava. So "metalava_enabled: false" is added to these
modules.
Test: make -j
Test: checkapi
Bug: 117127012
Merged-In: Ib65f3cd73dac0ac6ed64afeca6546d99739e4424
Change-Id: Ib65f3cd73dac0ac6ed64afeca6546d99739e4424
(cherry picked from commit 558e702be0eb2de76bb45303c99322561d73216c)
android.test.* are built with java_sdk_library and api files are added
by running "make update-api".
android.test.base_static is created for allowing to use
android.test.base as a static library.
Bug:77577799
Test: make -j
Test: make checkapi
Test: make checkapi fails with a random change in the txt file
Test: adb shell cmd package list libraries |\
grep android.test.*
And check the android.test.* libraries
Merged-In: Ia27612657532e50b077a9c55dbef59ee3ec04b8a
Change-Id: Ia27612657532e50b077a9c55dbef59ee3ec04b8a
Adjust the build rules of android.test.*.stubs packages to also
produce a jar with dex files. This will be used by the `hiddenapi`
tool to categorize the boot class path equivalents as public API.
Bug: 79409988
Test: m android.test.base.stubs ; check javalib.jar contains dex
Merged-In: I1d0850b18044c559ea4b9893d929dc45884b32c3
Change-Id: Ief28cd5e6d0cdd58f22fab751e0173ccf8c69a0c
Most jars don't need to be installed on the device. Instead of
using java_library and java_library_static to distinguish between
them make java_library and java_library_static identical and use
installable: true to identify the few jars that need to be dexed
and installed on the device.
Bug: 110885583
Test: m checkbuild
Change-Id: I579da7c1a712ec4fb49e288e7f3ab369cb75baf4
Stubs libraries android.test.mock.stubs and
android.test.mock.stubs-system are now built in Android.bp.
(Note that API check and update are still done in Android.mk)
As a good side effect, this allows android.test.runner[-minus-junit]
libraries (that are defined in Android.bp) to be built with the
android.test.mock.stubs instead of the runtime library
android.test.mock. This in turn allows us to prevent java:sdk ->
java:platform dependency also in Soong, because the runner libraries
were the only violators.
Bug: 73829976
Test: m -j android.test.mock.stubs android.test.mock.stubs-system
Test: m -j checkapi
Test: m -j update-api
Merged-In: I830a8eb13aa43b9aa4c8394f3c2fd91ee18b1f85
Change-Id: I830a8eb13aa43b9aa4c8394f3c2fd91ee18b1f85
(cherry picked from commit e649b8066c3385ba0b667a79d378402b15ef3127)
Unbundled builds use the prebuilt libs in /prebuilts/sdk/current and
system_current.
Bug: 73829976
Test: m -j ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Merged-In: I61fe0d671778595f49be82d7c11caffc411f58a3
Change-Id: I61fe0d671778595f49be82d7c11caffc411f58a3
(cherry picked from commit ea93a9ebc22d2685ecc94b0a51175ec7c6eb7d05)
Stubs libraries android.test.mock.stubs and
android.test.mock.stubs-system are now built in Android.bp.
(Note that API check and update are still done in Android.mk)
As a good side effect, this allows android.test.runner[-minus-junit]
libraries (that are defined in Android.bp) to be built with the
android.test.mock.stubs instead of the runtime library
android.test.mock. This in turn allows us to prevent java:sdk ->
java:platform dependency also in Soong, because the runner libraries
were the only violators.
Bug: 73829976
Test: m -j android.test.mock.stubs android.test.mock.stubs-system
Test: m -j checkapi
Test: m -j update-api
Merged-In: I830a8eb13aa43b9aa4c8394f3c2fd91ee18b1f85
Change-Id: I830a8eb13aa43b9aa4c8394f3c2fd91ee18b1f85
(cherry picked from commit e649b8066c3385ba0b667a79d378402b15ef3127)
The repackaged.android.test.mock uses internal APIs so cannot be built
against the SDK which means that anything that depends on it cannot
guarantee to run if those internal APIs change.
That library was built because the classes in
repackaged.android.test.runner depend on them. However, the
repackaged.android.test.runner library is only used by the
cts-api-signature-test target and it does not use any android.test.mock
classes directly, or indirectly. Therefore, this simply excludes any
classes from repackaged.android.test.runner that depend on
android.test.mock classes so that repackaged.android.test.mock can be
removed altogether.
Bug: 69899800
Bug: 30188076
Test: make checkbuild
Change-Id: If4528e6a4ec2b08faffd6d413672c5004d85e0a9
This CL pins the following make targets to java_version 1.8,
which is currently the default:
framework-protos
repackaged.android.test.base
repackaged.android.test.mock
repackaged.android.test.runner
For consistency, their dependencies,
android.test.base
android.test.mock
android.test.runner
which contain .java source files, are also pinned to 1.8.
This is so that the two steps:
a) update jarjar to support v53 class files
b) support -target 1.9 in the rest of the toolchain
can be completed in any order, in future CLs. Before this CL,
they would have needed to be completed in order a), b).
Bug: 72703434
Test: EXPERIMENTAL_USE_OPENJDK9=true USE_R8=true make checkbuild docs
(in a client where CL http://r.android.com/596874 was reverted)
Change-Id: If78067294ae7ab78997aa109b0e08be427bdf0b8
The legacy-test target is deprecated and will be replaced by
android.test.base. This replaces a few usages of the legacy-test target
in Android.bp files with android.test.base.
Bug: 30188076
Test: make checkbuild
Change-Id: I3575f638114fe2a3b703e67837496346bde24472
See build/soong/README.md for more information.
Test: m checkbuild
Change-Id: I110f752d2fa94c44581f20d4f308d9d429da0517
Merged-In: I110f752d2fa94c44581f20d4f308d9d429da0517
(cherry-picked from commit 2b7d71c7f8028741c2200bfeba8913b7f4f55cde)