Adds a new --key_field option to merge_csv.py which specifies the name
of the field that should be used to sort the input. If specified it
causes that field to be the first in each row and performs the merge
operation of a merge sort on the input files. That assumes that each
input file is already sorted into the same order.
Modifies the rules that use merge_csv.py to pass in:
--key_field signature
to sort the rows by signature.
Bug: 180387396
Test: Verified that hiddenapi files (both aggregated ones and for the
individual modules) are not affected by this change other than
changing the order.
Change-Id: Idcd5f0fea373b520b604889e1c280f21ed495660
Previously, multiple APEX variants of some boot jars were being
processed by hiddenapi to extract information which resulted in
duplicate entries in the monolithic hidden API files.
This change applies the same filter that was previously used to ensure
that the hiddenapi-flags.csv file did not include any duplicates to all
sources of hidden API information.
Bug: 180102243
Test: m droid
Verified that hiddenapi files (both aggregated ones and for the
individual modules) are not affected by this change other than
removing some duplicates entries.
Change-Id: I9ffc8586d5d6efea4e3440be2dfd5424790665c8
Export information about java dependencies through a Provider
instead of accessing the module directly.
Test: java_test.go
Test: no changes to build.ninja
Change-Id: Ifc5d566bf6f6ebc0ad399e948effaa1ef6a22876
Also, creates a python_binary_host module for generate_hiddenapi_lists
and uses that when constructing the build rule rather than using the
file directly.
Bug: 177317659
Test: m droid
Verified that hiddenapi files (both aggregated ones and for the
individual modules) are not affected by this change.
Change-Id: Ia11bb203ce5a74740d35f1b7e86716e15aad336e
The index file and the metadata file both currently include duplicate
entries due to them including both the <x> and <x>.impl libraries
created by java_sdk_library in their inputs, plus including both source
and prebuilt versions of the same named module. This change adds a test
to illustrate that behavior. A follow up change will correct the problem
and update the test accordingly.
This change only adds a test for the index file because the metadata
file depends on files from frameworks/base which makes it difficult to
test. Bug 177317659 will fix that and allow the metadata file
generation to be tested too.
Bug: 178361284
Test: m nothing
Change-Id: I33921d7267c9f4bb42726343d73f8a396d536aaa
Previously, it ignored any module that was not a platform apex variant
however that required every module that was referenced from the boot
jars to have a platform variant which is not the case when building
from prebuilts.
This change switches it to explicitly check that the variant is for
either the appropriate apex or the platform depending on what is
configured in the BootJars or UpdatableBootJars.
It partially duplicates some logic from the getBootImageJar() function.
It intentionally does not refactor the getBootImageJar() to allow for
reuse because coupling the hiddenapi and dexpreopt logic would make
refactoring either of them more difficult. Any duplicated code will be
deduped once they have both been refactored.
Bug: 178361284
Test: m droid
Change-Id: I4b4e0dc8ee40c1ba1713d7ef72df13d175e84af6
By enabling these hiddenapi CSV files to be prebuilt, it
becomes possible to create a split build that supports
the hiddenapi encode dex step, but doesn't contain all
of the java sources needed to generate the CSV files.
Bug: 175048716
Test: m nothing
Test: new TestHiddenAPISingletonWithPrebuiltCsvFile
Test: local build without prebuilt hiddenapi
Test: local build with prebuilt hiddenapi
Change-Id: I805ea3ec05860d2df211a3985ec025bf36f0d775
These APIs were temporarily blocked but are now being moved to the
max-sdk-r for final release. Tag these APIs as "lo-prio" since we
believe that they are unused.
Bug: 173499988
Test: m
Change-Id: If9c6be963faa75df77cf3cc7761b384324c8cd3e
Adds some additional information into the paths that are created when
modules are missing in Soong but SOONG_ALLOW_MISSING_DEPENDENCIES=true.
Test: try and build platform against art prebuilts
Bug: 171061220
Change-Id: Ifbcc0af5bdbd15409758a3b6f216cf9b3b5dba31
Enable the RuleBuilder and RuleBuilderCommand methods to access
the BuilderContext by passing it to NewRuleBuilder instead of
RuleBuilder.Build.
Test: genrule_test.go
Test: rule_builder_test.go
Test: m checkbuild
Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
This is a temporary measure to allow these APIs to be identified by
downstream tooling. Before S is finished, these APIs will be moved
to the max-target-R list anyway.
Adding the lo-prio flag should have no semantic impact on these APIs
but does allow them to be distinguished from the regular blocklist
APIs.
Test: m
Bug: 174455522
Change-Id: I031dcecbdef34a4f93a0fec1a92d95f769918486
This allows the presubmit checker to explicitly allow certain changes to
these APIs, rather than special casing tha max-target-o list. This in turn
will allow other APIs to be tagged as lo-prio in future to get the same
treatment.
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
Bug: 172993934
Change-Id: Ic7cc0243b2b018c96d420a3f266c4b3a6958c32f
Refactor flags in generate_hiddenapi_lists.py" the invocation to use the
new more flexible schema. Add "--tag removed" to removed.txt APIs so
that we can identify those APIs in the final output.
Test: m -j out/soong/hiddenapi/hiddenapi-flags.csv
Bug: 171300342
Change-Id: I38f2ec7c6e2ff7e5bdd9fe2aeb771d5153a2dc99
Use the output of new genrule combined-removed-dex instead of the
removedDexApi output from various metalava runs when generating the
hiddenapi-flags.csv file.
There are some minor difference in the two combined-removed-dex files,
but these diffs do not amount to any diffs in the generated
hiddenapi-flags.csv file. See the full set of diffs here:
https://paste.googleplex.com/6632343525654528
Bug: 158465496
Test: diff hiddenapi-flags.csv before and after
Change-Id: I082d18fc2b8a57ea8c5941d5c955a7970ab9d860
A global variant was used to store the global mapping between
modules and APEXes. Replace it with storing pointers to APEX
contents inside each module so that they can query the contents
of any APEXes they belong to.
Bug: 146393795
Test: all Soong tests
Test: single line change to build.ninja host install dependency ordering
Test: no Android-${TARGET_PRODUCT}.mk, make_vars-${TARGET_PRODUCT}.mk or late-${TARGET_PRODUCT}.mk
Change-Id: Id2d7b73ea27f8c3b41d30820bdd86b65c539bfa4
Instead of UnbundledBuild, use AlwaysUsePrebuiltSdks
to determine if java modules needs to be built against prebuilt sdks.
And rename UnbundledBuildUsePrebuiltSdks to AlwaysUsePrebuiltSdks to
express its behavior more correctly.(It can be orthgonal to "Unbundled")
Bug: 160390776
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage
Change-Id: I0be7265c1959d8774c295372cd7a9250169f6df9
- Car framework has removed system APIs.
- These APIs should be tracked at run-time.
Bug: 154832144
Test: 1) android.signature.cts.api.AnnotationTest#testAnnotation
2) diff $OUT/soong/hiddenapi/hiddenapi-flags.csv before and after this CL
Change-Id: I9813df4b514da41e82d45e6c0bc92643916fe0d8
This reverts commit b0dc851ff4.
Reason for revert: relanding original change. Build failures were
caused by a race with another CL: https://r.android.com/1320920
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Ic9016582dae7773b4d4f84a63425f1ef7a5d061f
This is a prerequisite change before adding DexJarInstallPath.
Test: lunch aosp_cf_phone-userdebug && m
Change-Id: I033e08b8bb06c0a844a6bbbfcdc48ce33e9c95cf
Use droidstubs for public and system stubs to provide a list of @removed APIs. As these APIs are not present in the stubs, they are not whitelisted / greylised automatically. Keep them on greylist manually.
Bug: 143864733
Test: diff out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I4c8e6899fadfdfd1da82f6f453cc92e71aa9b78c
Merged-In: I4c8e6899fadfdfd1da82f6f453cc92e71aa9b78c
Exempt-From-Owner-Approval: clean cherry-pick
(cherry picked from commit c7fb5c9964)
Use droidstubs for public and system stubs to provide a list of @removed APIs. As these APIs are not present in the stubs, they are not whitelisted / greylised automatically. Keep them on greylist manually.
Bug: 143864733
Test: diff out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I4c8e6899fadfdfd1da82f6f453cc92e71aa9b78c
Flow:
1. Annotation processor generates a CSV file per class as a CLASS_OUTPUT resource.
2. hiddenapi.go extracts individual .csv files and merges them into an index.csv file per module.
3. hiddenapi_singleton.go merges individual index.csv files into a combined .csv file.
In a follow up hiddenapi-index.csv would replace unsupportedappusage_index.csv
Bug: 145132366
Change-Id: I87d92f9c8d4b1cc1df526fc576ee3c2101116b58
Merged-In: I87d92f9c8d4b1cc1df526fc576ee3c2101116b58
Test: diff unsupportedappusage_index.csv hiddenapi-index.csv
Exempt-From-Owner-Approval: cp from r.android.com/1239709
Flow:
1. Annotation processor generates a CSV file per class as a CLASS_OUTPUT resource.
2. hiddenapi.go extracts individual .csv files and merges them into an index.csv file per module.
3. hiddenapi_singleton.go merges individual index.csv files into a combined .csv file.
In a follow up hiddenapi-index.csv would replace unsupportedappusage_index.csv
Bug: 145132366
Change-Id: I87d92f9c8d4b1cc1df526fc576ee3c2101116b58
Test: diff unsupportedappusage_index.csv hiddenapi-index.csv
Original Commit Message:
"""
Rename modules that are APEX-only
The renamed modules are only available for APEXes, but not for the
platform. Use the <module_name>.<apex_name> syntax to correctly install
the APEX variant of the modules.
"""
Reason for revert: Build Cop - Breaks about 15 AOSP targets, with high confidence due to these changes being the only non-robot changes in those builds.
Reverted Changes:
I190ce2d10:Use apex_available property
I990e0a67e:Use apex_available property
I0d1295683:Revert "Avoid duplicated classes for boot dex jars...
I5fb725403:Find the jar libraries in APEX from the correct pa...
I322b1efcc:Rename modules that are APEX-only
Ifa2bd0f8f:Use apex_available property
Iac6533177:Use apex_available property
Ie999602c6:Use apex_available property
I2a3d73397:Use apex_available property
Ic91bcbb9a:Use apex_available property
Ia6c324eed:Use apex_available property
I964d0125c:Use apex_available property
Change-Id: I48b998629b0676cd7353e6844fd87585e0e42989
This reverts commit 2812df4edb.
This is no longer required as we have
I6463ebc59cf7fd861b812999d7a79c387bbb3335.
hostdex files are available even when the module doesn't have
"//apex_available:platform"
Bug: 128708192
Test: m
Change-Id: I0d1295683222bc9cdbb82630e61ab3421c717daf
When a boot classpath java library is directly or indirectly included in
APEXes, multiple variant of the library exist. When running the
hiddenapi tool, we need to eliminate the duplication, otherwise the tool
will complain.
Previously, we simply choose the platform variant of the java library
among the multiple variants. However, if the java library is marked not
available for the platform (i.e. "//apex_available:platform" is not in
the apex_available property), the platform variant does not exist and
thus it is not fed into the hiddenapi tool, which causes missing
references in the tool.
To solve the problem, the platform variant is selected only for the java
libs that are available for the platform. For those libs that are not
available for the platform, we choose one variant of it using a
heuristic; skip testing APEXes and choose com.android.art.release among
the com.android.art.* variants.
Bug: 128708192
Test: m
Change-Id: I33bf297eb3029696ae3504a011486210708fb2c2