Commit Graph

1828 Commits

Author SHA1 Message Date
Automerger Merge Worker
52d8fd07c4 Merge "m <apex_name>-deps-info prints the internal/external deps of the APEX" am: 573326a8ce am: ef9f93cfac am: 00cdc4a80f
Change-Id: Ie40197044f09140d14262cdf6a17aae1d3c6582e
2020-01-09 01:17:11 +00:00
Treehugger Robot
573326a8ce Merge "m <apex_name>-deps-info prints the internal/external deps of the APEX" 2020-01-09 00:44:13 +00:00
Automerger Merge Worker
1df33fc88a Merge "Define a make variable for merged compat config." am: 62c085d7fe am: 950a589fe4 am: 6e024b5da9
Change-Id: I7d8a14256b5e24fe1073e22cc931834968d2a1ba
2020-01-08 22:56:26 +00:00
Treehugger Robot
62c085d7fe Merge "Define a make variable for merged compat config." 2020-01-08 21:26:23 +00:00
Automerger Merge Worker
16875f92b2 Merge "Include jacoco in the ART boot image if EMMA_INSTRUMENT_FRAMEWORK=true." am: 11e1ae025f am: 9425c8c78c am: 34187e47ca
Change-Id: I12d53d0f34d92f1d9e35da80804649788057f478
2020-01-08 11:46:49 +00:00
Automerger Merge Worker
3db11d4c7c Merge "Move generation of the dexpreopt tool paths into Soong." am: 46f60291f3 am: 0233e754e8 am: 3e484c30fb
Change-Id: I6d766184b1d308d9adbc0095228d960a4e37d3d6
2020-01-08 11:46:20 +00:00
Mathew Inwood
653c78a909 Define a make variable for merged compat config.
This allows it to be added to the dist target.

Test: m dist
Change-Id: I1d913577f43a2ba3cb134ed35a7c98be76da2bd1
2020-01-08 11:24:58 +00:00
Ulyana Trafimovich
11e1ae025f Merge "Include jacoco in the ART boot image if EMMA_INSTRUMENT_FRAMEWORK=true." 2020-01-08 10:58:24 +00:00
Martin Stjernholm
46f60291f3 Merge "Move generation of the dexpreopt tool paths into Soong." 2020-01-08 10:40:28 +00:00
Automerger Merge Worker
2a52cf8ae6 Delay invalid sdk_version error for AllowMissingDependencies am: 07c8856904 am: 400665159a am: 9b47a016ab
Change-Id: Ia1242d255232ef339bee8425f556b927cfd1fb49
2020-01-07 20:48:52 +00:00
Colin Cross
07c8856904 Delay invalid sdk_version error for AllowMissingDependencies
Unbundled builds set AllowMissingDependencies and attempt to use
prebuilts for some jars.  Delay the errors for missing jars for
modules with invalid sdk_version values in unbundled builds so
that they only block the build if those modules are built.

Also fix some error messages to show the original sdk_version
value.

Bug: 146513037
Test: m TARGET_BUILD_APPS=Camera2
Change-Id: I1812ef6dc80895f7a2162a8bdbf2c5067755e9a0
2020-01-07 20:14:14 +00:00
Martin Stjernholm
c52aaf11d0 Move generation of the dexpreopt tool paths into Soong.
The dexpreopt global config is now split into the part that is generated
from make (in build/make/core/dex_preopt_config.mk) and the part that is
generated from Soong. Since the goal is to generate the dex2oat path from
Soong dependencies, the old GlobalConfig.Tools struct is simply repurposed
for the Soong generated config, although the intention is to allow more
settings to migrate from make to Soong, and hence from GlobalConfig to
GlobalSoongConfig.

Since the new dexpreopt_soong.config is written from a Soong-created ninja
rule, it doesn't need to be rewritten to out/soong/<device>/ like the old
make-created config file.

Test: m
Test: env USE_DEX2OAT_DEBUG=false m
  (check that out/soong/dexpreopt_soong.config points to dex2oat instead of dex2oatd)
Bug: 145934348

Change-Id: Ifd45c4a08e2ec55b86f4a93f0d85bd39cf2cf189
2020-01-07 14:15:42 +00:00
Automerger Merge Worker
59dbe24228 Merge "Respect JIT-zygote config when generating boot image location." am: 99d522b5df am: 540d35006f am: 09ecf51657
Change-Id: Ib4eb9273a6eed38c55873ff8758658677b9510eb
2020-01-07 11:30:51 +00:00
Ulyana Trafimovich
99d522b5df Merge "Respect JIT-zygote config when generating boot image location." 2020-01-07 10:48:45 +00:00
Automerger Merge Worker
1ea5d14650 Merge "Pass auto_gen_config setting in Android.bp to makefile" am: 13f30ae38c am: 75b879c30b am: 458321b216
Change-Id: Iecd57fcaac4b7b3d70c99de73037ff4c5aea5cc6
2020-01-07 08:35:45 +00:00
Dan Shi
13f30ae38c Merge "Pass auto_gen_config setting in Android.bp to makefile" 2020-01-07 06:23:04 +00:00
Automerger Merge Worker
44d61e2d28 Merge "Remove unused system_modules" am: 9a3f61cd43 am: 40a301a80e am: 7f560b1cca
Change-Id: I119d3debb1740b29025df44a28993f8a4d6a48d1
2020-01-07 04:30:46 +00:00
Treehugger Robot
9a3f61cd43 Merge "Remove unused system_modules" 2020-01-07 03:51:09 +00:00
Dan Shi
2468d015fe Pass auto_gen_config setting in Android.bp to makefile
Bug: none
Test: local test with fuzzy_fastboot
Change-Id: I2c62f6fb58737538ef9e1e9fcbe63e03dfa7ee91
2020-01-06 16:21:10 -08:00
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