Running find on the entire module directory can lead to flaky failures
when a directory is modified by another rule while find is traversing
it. Pass a list of libraries in the module into the script instead
of finding them on disk.
Fixes: 178509901
Test: TARGET_BUILD_APPS=com.android.runtime dist
Change-Id: Ie4bf288f0e3d99cbbed5ca8770687a9bbe5377e4
Invokes hiddenAPIExtractInformation() on the dex jar provided by the
deapexer (on behalf of prebuilt_apex) so that hiddenAPI can extract the
information it needs, if anything, from the dex file (and accompanying
classes implementation file).
The dex file provided by deapexer has already had the hiddenapi
information encoded into it so it does not need to do that again.
This change adds the primary parameter to hiddenAPIExtractInformation()
and checks it (and also the hiddenAPI.active property) before it does
anything. That ensures that it behaves correctly when called directly
as well as when called from hiddenAPIExtractAndEncode().
Bug: 178361284
Test: m droid
Verified that hiddenapi files (both aggregated ones and for the
individual modules) are not affected by this change.
Also verified that the hiddenapi files created when using the
prebuilts (using SOONG_CONFIG_art_module_source_build=false) are
the same as when using the source. There is a slight difference
in the order but otherwise identical.
Change-Id: I7abb63fd310bb94787ab7f4821e5fd283dc03046
A follow up change needs to be able to contribute to the information
the hiddenapi process collates without having a dex file encoded. This
change pushes all the functionality related to information gathering
into the hiddenAPIGenerateCSV() method and then renames it and the
hiddenAPI() method to make it clearer what they do.
Bug: 178361284
Test: m droid
Verified that hiddenapi files (both aggregated ones and for the
individual modules) are not affected by this change.
Change-Id: I04417720216a0fbadcd88e6185e7de6570af6216
This change registers the hiddenapi singleton so that hiddenapi
processing is performed as part of
TestBootDexJarsFromSourcesAndPrebuilts so that additional hiddenapi
related tests can be added later.
The hiddenapi singleton uses the BootJars/UpdatableBootJars properties
from productVariables not the dexpreopt.GlobalConfig so this change
makes sure that they are consistent.
Performing hiddenapi processing causes the dex file used in "prebuilt
with source apex preferred" test to be encoded with hiddenapi
information which changes the path in the test.
Bug: 178361284
Test: m nothing
Change-Id: I2eb3d8cf11f6fb3bf4a34d6e4ae0c397c890191e
A subtest (code inside the func passed to t.Run(...)) are passed their
own t *Testing pointer to use to report errors in order to ensure that
they are treated as errors of the subtest and not the containing test.
This change ensures that the subtests in the following tests use the
correct t *Testing.
* TestPrebuiltExportDexImplementationJars
* TestBootDexJarsFromSourcesAndPrebuilts
Bug: 178361284
Test: m nothing
Change-Id: I4e8b166051cb6098c89d8e68a450c81a714f7677
When a cc module is built against a stub, compiler passes version macro
of the stub lib. Version macro should be numeric, so codenames or
"current" should be mapped to numbers just like how ndkstubgen maps to.
* "current" -> future (10000)
* codenames -> look up api_level.json
* otherwise -> cast to int
Bug: 179329813
Test: m / soong test / manually check the output build.ninja
Change-Id: Ic0e1dd904984e161694a0b77fad5559c06a4462f
This currently expands all globs, still need to support converting glob
syntax.
Test: go build_conversion_test
Test: GENERATE_BAZEL_FILES=true m nothing
Test: m nothing
Bug: 165114590
Change-Id: If7b26e8e663d17566fad9614ca87a8da1f095284
libbinder_headers_platform_shared is a new header lib shared between
libbinder/libbinder_ndk. Since it is re-exported via libbinder_headers,
it should be added to allowed_deps.txt as well.
Bug: 179020493
Test: m
Test: aidl_integration_test
Change-Id: I7fe89766c8e7924edf2a3ddd69c2876611d0dd0a
Even if this binary is only used in a testing apex for dynamic common
library apex that will be removed once we have a production version
ready, we need said apex to be marked as updatable too.
Bug: 177879489
Bug: 179013728
Test: builds
Change-Id: I8ae519da164f1f5355d4c2dfeca88a497cda7990
(cherry picked from commit 0d3ff6d918)
Mistakenly used HostAndDeviceDefault (which builds host and device
variants by default) instead of HostAndDeviceSupported which only
builds a device variant by default.
Moved the test definitions of art and framework boot images from being
defined in all Java related tests into the test where they belong. This
is needed in order to improve the ART and framework boot image specific
testing.
Bug: 177892522
Test: m droid
Change-Id: I16771f09bd789033e18c58ae6dd4b6b9e865d831
Previously, the apex module had to hard code behavior specific to the
art apex module in order to include the art boot image. This change
adds support to the apex module to allow the boot images to be
specified per apex.
In combination with a change to add the "art-boot-image" to the ART
apex this allows the custom code for handling the art boot image in
apex to be removed.
That custom apex code also included the logic to ensure that the
GlobalSoongConfig was initialized for use by the dex_bootjars
singleton. That logic has been moved from the APEX to the boot_image
module. That ensures that it will be run if and only if a boot_image
module is present in the checked out repos. So, limited manifest
checkouts which do not contain the art or frameworks/base repos (which
is where the boot_image modules are defined) will not attempt to run
this logic, which would fail because dex2oat would not be present.
Bug: 177892522
Test: m droid
Change-Id: I02d25fbef6e864e31eb5e0f4eb50358c79486db0
Compression is useful only for big enough apexes. We can manually opt-in
them, instead of trying to find list of apexes that should be opted-out.
Test: m
Bug: 178713634
Change-Id: Ice86fabb7c1db4a1e21e4c983d595cfd3a1c0b7a
are present.
1) The boot jar to APEX mapping is maintained by the base names for
both of them. When building with prebuilt modules and APEXes, that
means we need to take care to compare them without regard to any
"prebuilt_" prefixes.
2) VisitAllModules can visit disabled modules and both source and
prebuilt modules, so they need some conditions to skip modules that
aren't applicable for boot jars.
Test: `m droid`
Test: `m droid SOONG_CONFIG_art_module_source_build=false`
with fresh ART Module prebuilts in place
Bug: 171061220
Change-Id: Iced269d29127bc8b8f9b3171adb60a97d115628b
an aidl module should specify its version. because of that some deps
which have version on its name is added.
Bug: 150578172
Test: m
Change-Id: If5c5d66e59f33ecf37d118b2b80db820ec78ea04
Adds a boot_image module type. Follow on changes will add instances of
boot_image to represent the ART and framework boot images in the art
and frameworks/base repositories respectively.
For the moment they retrieve their associated boot image configuration
from the map returned by genBootImageConfigs() and leave the actual
work of creating the ninja rules to create the boot images to the
dex_bootjars singleton.
Bug: 177892522
Test: m droid
Change-Id: Ib69701de0d24d996bb8e8be7a20b941be907390e
Previously, some tests used "com.android.art.something" as the name of
the APEX containing the ART boot jars but that is not the valid name
for an ART APEX. This change switches that to "com.android.art.debug".
Bug: 171061220
Test: m nothing
Change-Id: I057edc58ae81cdb14076a2d7d117ca1764aa3e52
Previously, the test mistakenly configured BootJars which meant the
test was testing not just the propagation of paths to files retrieved
from the prebuilt apex to the java_import module but also the process
of finding appropriate boot jars.
It also set "prefer: true" on the prebuilt_apex instead of the
java_import when checking to make sure that it still found the correct
module when both prebuilt and source were available and the prebuilt
was preferred.
Bug: 171061220
Test: m nothing
Change-Id: I4f2fa7ea372b14d4b169cdc78bdeb1ca4ac4dff8
If we don't check "current", it won't be checked even in the finalized
branch.
If we don't check "preview", it should be done during the SDK
finalization. It'd be better done before the SDK finalization regarding
that setting min_sdk_version is to get approval from deps library owners.
Bug: 177833148
Test: m (soong tests)
Change-Id: I712b61cfe5a134fbb69c73956d26fb3a1e5c011e
an aidl module should specify its version. because of that some deps
which have version on its name is added.
Bug: 150578172
Test: m
Change-Id: I4fe33974190765615069d0ba894e5ab4dcc3064f
Merged-In: I4fe33974190765615069d0ba894e5ab4dcc3064f
This reverts commit 556b2ad77e.
Original change-id: Ib1b2f0dd2f9ae85b1545c6cc5bb4c5bbdfac1c15
Reason for revert: Add excutable permission to the gen_ndk_backedby_apex.sh.
Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only
Change-Id: Ib587ba200cd7f2f61d478452b43c329d72b2de06