Commit Graph

1909 Commits

Author SHA1 Message Date
Automerger Merge Worker
f0c7bfa196 Merge "Add EarlyModuleContext for LoadHookContext" am: 7d20c4407c am: ea83ab5ecc am: b089fba01f
Change-Id: I12a8830989cfec3adf7bc6d8bd3af558992d284c
2020-01-06 22:27:19 +00:00
Treehugger Robot
7d20c4407c Merge "Add EarlyModuleContext for LoadHookContext" 2020-01-06 21:43:03 +00:00
Automerger Merge Worker
a4e55e6990 Merge "Verify APIs are compatible with last released api by default" am: a1af29ae4d am: 6307388229 am: d2418eee24
Change-Id: Ibba32661aa55080216c9d5d3d421979e7196cbcb
2020-01-06 17:15:29 +00:00
Automerger Merge Worker
c5e0673f96 Merge "Singleton build rule for merged compat config." am: ac65c69913 am: a8da239ade am: 31263c5079
Change-Id: If9c2cb64d468aea2532b754ccbe013b724856e84
2020-01-06 17:15:14 +00:00
Ulya Trafimovich
4456188939 Include jacoco in the ART boot image if EMMA_INSTRUMENT_FRAMEWORK=true.
Test: aosp_walleye-userdebug boots.

Test: Coverage build boots:
  $ lunch aosp_walleye-userdebug
  $ cd $ANDROID_BUILD_TOP
  $ build/soong/soong_ui.bash --make-mode droid \
    SKIP_ABI_CHECKS=true \
    TARGET_PRODUCT=aosp_walleye \
    TARGET_BUILD_VARIANT=userdebug \
    EMMA_INSTRUMENT=true \
    NATIVE_COVERAGE=true
  $ adb reboot bootloader && fastboot flashall -w

Test: Coverage build with framework coverage boots:
  $ lunch aosp_walleye-userdebug
  $ cd $ANDROID_BUILD_TOP
  $ build/soong/soong_ui.bash --make-mode droid \
    SKIP_ABI_CHECKS=true \
    TARGET_PRODUCT=aosp_walleye \
    TARGET_BUILD_VARIANT=userdebug \
    EMMA_INSTRUMENT=true \
    EMMA_INSTRUMENT_FRAMEWORK=true \
    NATIVE_COVERAGE=true
  $ adb reboot bootloader && fastboot flashall -w

Test: Static coverage build with framework coverage boots:
  $ lunch aosp_walleye-userdebug
  $ cd $ANDROID_BUILD_TOP
  $ build/soong/soong_ui.bash --make-mode droid \
    SKIP_ABI_CHECKS=true \
    TARGET_PRODUCT=aosp_walleye \
    TARGET_BUILD_VARIANT=userdebug \
    EMMA_INSTRUMENT=true \
    EMMA_INSTRUMENT_FRAMEWORK=true \
    EMMA_INSTRUMENT_STATIC=true \
    NATIVE_COVERAGE=true
  $ adb reboot bootloader && fastboot flashall -w

Change-Id: Iaa198b8505aaff36e6685559642ff721637ce55f
2020-01-06 16:52:56 +00:00
Treehugger Robot
a1af29ae4d Merge "Verify APIs are compatible with last released api by default" 2020-01-06 16:43:29 +00:00
Mathew Inwood
ac65c69913 Merge "Singleton build rule for merged compat config." 2020-01-06 16:32:54 +00:00
Ulya Trafimovich
3391a1e85f Respect JIT-zygote config when generating boot image location.
Earlier CL Ida40dfae8c83bf7c2e737d5c7ea418e1197ad826 introduced
Soong-generated Make variable 'DEXPREOPT_IMAGE_LOCATIONS'. That CL was
erroneous in that it did not take JIT-zygote config into account and
generated identical location for "boot" and "apex" boot images.

This caused build breakages, because in case of JIT-zygote config the
two variables 'DexPreoptImages' and 'DexPreoptImageLocations' in the
module's dexpreopt.config were out of sync: 'DexPreoptImages' was
for the "apex" image, and 'DexPreoptImageLocations' was for the "boot"
image.

CL I9a91fc48e54d7d43abec2cb2b5a11e3581db380b introduced a workaround
for this problem: incorrect 'DexPreoptImageLocations' from the module
dexpreopt.config was ignored, and instead boot image location was
manually reconstructed from 'DexPreoptImages'. This workaround would
not work when we start using boot image extension and location will
become more complex.

This CL fixes the way 'DexPreoptImageLocations' is generated by
spliting the 'DEXPREOPT_IMAGE_LOCATIONS' variable in two variables
depending on the boot image flavour "boot" of "apex". This is
aligned with the way other similar variables are generated.

Test: aosp_walleye-userdebug boots.
Test: walleye_jitzygote-userdebug builds
  (on git_rvc-release branch with this CL cherry-picked).

Change-Id: I93415227564522bce4250d281d561e708a022101
2020-01-06 16:01:55 +00:00
Paul Duffin
a465e435c2 Verify APIs are compatible with last released api by default
Previously, the checking of the current API for compatibility with the
previously released API was only enabled for a white list of targets
which included api-stubs-docs and system-api-stubs-docs. This change
replaces the white list of targets to check with a black list of targets
not to check so that the checks are performed by default.

The black list currently consists only of android.car-system-stubs-docs.

Bug: 134485888
Bug: 123222452
Test: m checkapi with an incompatible conscrypt API
Change-Id: I3b48b6cfb61e1f39d74fc48d9d2c0415f886d959
2020-01-06 15:19:02 +00:00
Automerger Merge Worker
24462b5cb6 Merge "java_sdk_library: Ensure that stubs library is not installed" am: 17cf0ab3bc am: 786d41db85 am: 87890b22b6
Change-Id: Ia60bdc9289704fe8f0bdc44a07bf70e52556bd71
2020-01-05 19:28:53 +00:00
Automerger Merge Worker
872780a494 Merge "java_sdk_library: Allow creation of impl shared library to be disabled" am: bcb6041b2a am: 603cad0d9f am: 09d2a80df9
Change-Id: I778701a963d613424b159226740edef56bbb145c
2020-01-05 18:55:38 +00:00
Automerger Merge Worker
da8b9ddd9b Merge "java_sdk_library: Allow api dir to be specified" am: 7e96dac325 am: 7da6648137 am: 21a48d2161
Change-Id: I97f4d144a54d307407ef3e4827b3be99333a9857
2020-01-05 17:30:12 +00:00
Colin Cross
1184b647d5 Add EarlyModuleContext for LoadHookContext
Make LoadHookContext embed a new EarlyModuleContext instead of
BaseModuleContext to reduce its API surface in preparation for
moving it to run during parsing instead of mutators.

Test: m checkbuild
Change-Id: I1cd3ff3b636e7e24991a9184d7521903473e505a
2020-01-04 08:40:55 -08:00
Automerger Merge Worker
1a73535558 Merge "java_sdk_library: Remove requirement for api_packages to be specified" am: 36809d52ba am: 160434a8d7 am: 710c7d3d0e
Change-Id: Id0877d4b59e12bd1155f9b0abbf06eb9d3204d3a
2020-01-03 14:00:55 +00:00
Automerger Merge Worker
ed94519ff1 Merge "java_sdk_library: support system_modules properly" am: 14544da609 am: c217e75762 am: b841cdf23f
Change-Id: Ic641f1f8ac2e27cbeab948707d5ef4d7ceb4a5e6
2020-01-03 14:00:44 +00:00
Jiyong Park
2fbf47f0c2 Remove unused system_modules
With
https://android-review.googlesource.com/c/platform/build/soong/+/1145829,
android_*stubs_current_system_modules are no longer used. Thus removing.

Bug: 142896162
Test: m checkbuild
Change-Id: Icb8ea48f9bdb73f780cd9bdacf4c111ca7b7cd9e
2020-01-03 14:16:22 +09:00
Automerger Merge Worker
ce1a0af7b9 Merge "java_sdk_library: Avoid generating system and test .txt files" am: 3afbc923dc am: f91ee9fb1a am: 3f8bcc2f82
Change-Id: I4b334fcb12b66905a9506cace767a8389560206e
2020-01-03 01:34:18 +00:00
Automerger Merge Worker
b0844b82e5 java_sdk_library: Rename createDocs to createStubsSources am: c4cea76c0d am: e616c37c88 am: 166c249881
Change-Id: I795e75484871ce45ceefe5ba6394f287ed4712ec
2020-01-02 16:43:23 +00:00
Automerger Merge Worker
bf54060404 java_sdk_library: Remove unused stubsLibraryDependencyTag am: 03fbd786b5 am: a17393c17c am: 1f0fe5c78f
Change-Id: Ib03943188161cb31428242f631de1ed3cfa5dc91
2020-01-02 16:43:20 +00:00
Paul Duffin
367ab91d60 java_sdk_library: Ensure that stubs library is not installed
Bug: 145998881
Test: m checkbuild
Change-Id: Ieabe563b8894f223ba66bf8ec7bf8bf1d9ca49b1
2020-01-02 15:38:42 +00:00
Paul Duffin
43db9bee5e java_sdk_library: Allow creation of impl shared library to be disabled
Most modules will be providing their implementations via APEX and so do
not need to create an implementation shared library as part of this.

Adds an api_only property which will:
* Prevent the creation of the implementation library.
* Prevent the creation of the .xml file needed at runtime to make
  the shared library available.
* Prevent the library being added to the list of java sdk libraries
  used by make to handle installation.

Bug: 145998881
Test: m checkbuild
Change-Id: Ida5e46a81aa5b0a041882d90d5f362ec79fdddb2
2020-01-02 15:38:42 +00:00
Paul Duffin
749f98fb64 java_sdk_library: Allow api dir to be specified
For modules that provide API surfaces in addition to the standard
current, test and system it is useful to be able to specify the
directory containing the api's .txt files to make it easy to create
multiple API surfaces from within the same Android.bp file. e.g. This
is useful for conscrypt, icu and libcore to manage their intra core
and core platform APIs.

Bug: 145998881
Test: m checkbuild
Change-Id: I753631d9b6993fbf30019fef5c052a9429e519de
2020-01-02 15:38:42 +00:00
Paul Duffin
7a586d3a59 java_sdk_library: Remove requirement for api_packages to be specified
If api_packages is not set then will try and generate stubs from all
the source packages.

Bug: 145998881
Test: m checkbuild
Change-Id: Ic9d7f82bb34c4b960a2f17614d7f64ddd13ad8b0
2020-01-02 15:38:39 +00:00
Paul Duffin
12ceb4699b java_sdk_library: support system_modules properly
Bug: 145998881
Test: m checkbuild
Change-Id: Ia7663dca4b0ce84fe6dafca27e1aeb1bcda86221
2020-01-02 15:38:20 +00:00
Paul Duffin
37e0b77e3b java_sdk_library: Avoid generating system and test .txt files
If the library does not provide system and test APIs then do not
generate/require corresponding .txt files.

Bug: 145998881
Test: m checkbuild
Change-Id: I21cfdb0b63fd575e8c8c63ea2b436e0c4aa8f3fc
2020-01-02 15:38:18 +00:00
Automerger Merge Worker
07cdf35920 Merge "java_sdk_library: construct droidstubs args as []string" am: 0a83b7961c am: bc1aa20ebb am: cd8b9a20f2
Change-Id: Ia8f52cdfb94aa3729ecb97ed730107f7cd4f4d34
2020-01-02 15:08:05 +00:00
Paul Duffin
c4cea76c0d java_sdk_library: Rename createDocs to createStubsSources
The createDocs(...) method was obviously named because it created a
droiddocs target that generated the stubs source but it now creates a
droidstubs target so the name was misleading.

Bug: 145998881
Test: m checkbuild
Change-Id: I7419b0a01ee87ecb2b396e4817e5e88a88a8b7b6
2020-01-02 14:56:00 +00:00
Paul Duffin
03fbd786b5 java_sdk_library: Remove unused stubsLibraryDependencyTag
Bug: 145998881
Test: m checkbuild
Change-Id: I3ce0fa498c261a9a1f0382f6d548bb070a656358
2020-01-02 14:55:27 +00:00
Treehugger Robot
0a83b7961c Merge "java_sdk_library: construct droidstubs args as []string" 2020-01-02 14:34:06 +00:00
Automerger Merge Worker
2828cebddc Add support for java_test in sdk am: 1b82e6a108 am: c520a1723c am: 38c5a8c468
Change-Id: I758b0d1b8b70bede7a726960c53babcc2071334c
2020-01-02 11:31:54 +00:00
Jiyong Park
114ff53f5e m <apex_name>-deps-info prints the internal/external deps of the APEX
We need to have a way to see the list of modules that directly or
indirectly contribute to an APEX. People find it difficult to determine
whether a module is included in which APEXes because APEX tracks
indirect dependencies as well as direct dependencies. Therefore, just
looking at Android.bp for the APEX itself doesn't give the answer.

This change adds a new make target <apex_name>-deps-info, which
generates out/soong/<apex_name>-deps-info.txt file that shows the
internal and external dependencies of the said APEX.
Here, internal means the dependencies are actually part of the
APEX, while external means the dependencies are still external to the
APEX.

Bug: 146323213
Test: m (apex_test amended)
Change-Id: I33d1ccf5d1ca335d71cd6ced0f5f66b8c3886d13
2020-01-02 09:41:30 +09:00
Automerger Merge Worker
585928fc5d Restrict SdkMemberTypes that can be used with sdk/sdk_snapshot am: e602918294 am: b39c226ff7 am: 5f7e9a061b
Change-Id: I1b7d00af424d786c1f166f7d93776ff65278899e
2019-12-31 20:33:16 +00:00
Paul Duffin
e602918294 Restrict SdkMemberTypes that can be used with sdk/sdk_snapshot
By default SdkMemberTypes are only supported on module_exports module
type. Support for sdk module type has to be explicitly specified.

The java_header_libs, native_shared_libs and stubs_sources are
supported on sdk. The latter is required to provide the stubs source
for an API specified in java_header_libs as they should be kept in
sync.

Bug: 146341462
Test: m nothing
Change-Id: I19b9e60792780a797458d4a9e489506602b13144
2019-12-31 15:08:59 +00:00
Paul Duffin
1b82e6a108 Add support for java_test in sdk
Adds java_test_import module type for use by the sdk snapshot and
adds java_tests property to the sdk and sdk_snapshot module type.

This is needed for the conscrypt test sdk.

Bug: 143678475
Test: m nothing
Change-Id: Ied4c56c978dac2f92a9b3bc34b3235d7eeba2fd3
2019-12-31 15:08:59 +00:00
Paul Duffin
235ffffbdc java_sdk_library: construct droidstubs args as []string
Bug: 145998881
Test: m checkbuild
Change-Id: Id3eb99577200a807050dbf86f47816a2476c3d9c
2019-12-31 15:08:33 +00:00
Automerger Merge Worker
33e8d09228 Merge "Dedup generating xml file for java_sdk_library" am: 380f85edd3 am: 0fcd3e1e59 am: ef3c83de43
Change-Id: Ibfce5ab855aa13145d265e68ee9678d4aab4831a
2019-12-28 00:17:54 +00:00
Jooyung Han
624058e6a5 Dedup generating xml file for java_sdk_library
Permission XML file for java_sdk_library is generated by
java_sdk_library itself now.

And, build rule is switched to android.WriteFile since "echo -e" is
not supported from build server. (-e is printed to output)

Bug: 145474221
Test: m com.android.cronet and check its permissions xml file
     also, m org.chromium.net.cronet.xml (created dynamically)
Change-Id: Iffb119151c49bc4fe6c4386fa267cca193f37dbc
2019-12-26 12:20:24 +00:00
Automerger Merge Worker
986fe22e22 Merge "Generate .srcjar for prebuilt_stubs_sources" am: e2bc36f12c am: 954e23e3e0 am: a8d9e2ecdd
Change-Id: Ica5b34271f7c1e7854f4cc7847e653851552ef26
2019-12-23 14:02:03 +00:00
Paul Duffin
e2bc36f12c Merge "Generate .srcjar for prebuilt_stubs_sources" 2019-12-23 13:32:08 +00:00
Mathew Inwood
4d0c19c271 Singleton build rule for merged compat config.
This creates a single build artifact with all compat config from the build.

Test: m out/soong/compat_config/merged_compat_config.xml
Bug: 144927670

Change-Id: Ie60575469c22c201cf1f4d4c187c03c7212dd26b
2019-12-20 13:55:12 +00:00
Automerger Merge Worker
5232819c83 Merge "Update build rule for updated script." am: 431b8a2fdd am: 8f7dd2e8f3 am: 1ff584d604
Change-Id: Ieae5c37dd11ad4149cd37c91e1261b6285725111
2019-12-20 10:13:15 +00:00
Mathew Inwood
431b8a2fdd Merge "Update build rule for updated script." 2019-12-20 09:33:42 +00:00
Paul Duffin
9b478b0831 Generate .srcjar for prebuilt_stubs_sources
Changes prebuilt_stubs_sources to generate a .srcjar from its input
instead of just exposing the srcs it is given. This ensures that it can
be used as a drop in replacement for a droidstubs module.

Updates the test for prebuilt_stubs_sources to be more representative
of the actual use made of it by sdk snapshot which outputs a directory
not a glob pattern. Added some documentation of the
prebuilts_stubs_sources srcs property to make it clear that it is
supposed to be a set of directories.

Extracts common code from sdk/testing.go for normalizing path/paths
for testing.

Bug: 143678475
Test: m conscrypt-module-sdk conscrypt-module-host-sdk conscrypt-module-test-sdk
      unzip those in place of external/conscrypt
	  build core-current-stubs-source which expects it to provide a .srcjar.
Change-Id: I8204a022557a9b0b45e19eac79ecba98ff95213d
2019-12-20 08:13:45 +00:00
Automerger Merge Worker
74375f5bb5 Merge "Support java_sdk_library as java_libs of apex" am: 120d73fe4f am: 1d39e165f7 am: 97dd8ef8e4
Change-Id: I6c920a472d77993fbc65cda2959b9b8f26e458b3
2019-12-20 05:46:55 +00:00
Treehugger Robot
120d73fe4f Merge "Support java_sdk_library as java_libs of apex" 2019-12-20 05:16:31 +00:00
Automerger Merge Worker
4e965ebbce Merge "Improve cc tests by adding sanitizer mutators" am: 7d211f1793 am: 152b5f8675 am: 5b91dc8d39
Change-Id: Ife351bc2628c32e7473ead96097b6ebd325604ec
2019-12-20 02:50:24 +00:00
Automerger Merge Worker
504b300fc6 Merge "Dedup prebuilt mutator registration" am: 82f4f99780 am: 849e8f7509 am: e05577b9a8
Change-Id: I094959ab23674cafcc40455f5ea1c062085c75f1
2019-12-20 02:50:06 +00:00
Automerger Merge Worker
598e0885e7 Merge "Dedup registration for cc default test config" am: 24de9ea201 am: 6da6395f16 am: 1971acf840
Change-Id: Iff72ebfc46ba03e5b9a26ba04e6810f720747bc7
2019-12-20 02:48:49 +00:00
Jeff Sharkey
2123b96921 Merge "Move MediaStore.java inside APEX boundary." 2019-12-20 01:17:46 +00:00
Jooyung Han
58f26aba4e Support java_sdk_library as java_libs of apex
When a java_sdk_library module is added, both impl jar and permission
xml files are packaged together.

For example, when a java_sdk_library "foo" is listed, following two
entries will be in an APEX package.

/javalibs/foo.jar
/etc/permissions/foo.xml

Bug: 145474221
Test: m com.android.cronet
      deapexer list com.android.cronet.apex

Change-Id: If5883c02255e9309f20810b1532d3fbe73bf4e95
2019-12-20 08:50:34 +09:00