platform_build_soong/java
Paul Duffin fb8f07bc0e Calculate widest stub dex jars per module
Previously, the stub dex jars for each HiddenAPIScope was created by
merging the stub dex jars provided by each module for that scope. Then
the widest stub dex jars were chosen. So, if module A provided public,
system and test stub dex jars and module B provided only public then
the stub dex jars for each scope would be:
* public -> A,B
* system -> A
* test -> A

So, the widest API scope for which there are stub dex jars is "test"
and so the widest stub dex jars would just come from module A and not
module B. So, when "hiddenapi list" is run for module C which depends
on modules A and B it only gets given stub dex jars for module A which
means that it cannot resolve all the types that C may use which can
lead to incorrect flags being generated.

This change does not merge the stub dex jars from each module together
and instead keeps them separate by module. The widest stub dex jars
list is constructed by asking each module in turn for their widest stub
dex jars. e.g. Given the above example we would have:

Module A:
* public
* system
* test <- widest

Module B:
* public <- widest

So, the widest stub dex jars will be A's test and B's public stub dex
jars.

Bug: 179354495
Test: m out/soong/hiddenapi-flags.csv
      - make sure that this does not change the file.
Merged-In: Ib137825ebffe94b2bf220732bae6077f7b7ac6db
Change-Id: Ib137825ebffe94b2bf220732bae6077f7b7ac6db
(cherry picked from commit 280a31aac39697a069f2f2f2ee471ffafb52d2a3)
2021-06-28 16:05:05 +01:00
..
config Time out and dump stacks from R8 processes after 30 minutes 2021-04-30 14:14:46 -07:00
Android.bp Add ClasspathElement support 2021-06-18 21:02:10 +01:00
OWNERS
aapt2.go Improve comments in java/aapt2.go 2020-11-30 14:16:02 -08:00
aar.go SdkSpec is fully using ApiLevel 2021-04-12 13:46:21 +09:00
android_manifest.go SdkSpec is fully using ApiLevel 2021-04-12 13:46:21 +09:00
android_resources.go Add preparer for overlay pre-singleton registration 2021-03-22 22:09:53 +00:00
androidmk.go add the LOCAL_DISABLE_TEST_CONFIG variable 2021-06-03 10:16:39 -07:00
androidmk_test.go add the LOCAL_DISABLE_TEST_CONFIG variable 2021-06-03 10:16:39 -07:00
app.go Merge "Refactor vendor snapshot to use LinkableInterface." am: 7ce2dee09e am: 61c475060a am: 001c11e93a 2021-05-12 21:13:41 +00:00
app_builder.go Move android package on top of remotexec 2021-03-18 16:17:34 -07:00
app_import.go Merge "SdkSpec is fully using ApiLevel" am: f398995a64 am: fe24728dc9 2021-04-14 14:42:56 +00:00
app_import_test.go Merge "Remove uses of buildDir from java/app_import_test.go" am: 6567d07f59 am: c9d8035712 am: de9cbc5d2e 2021-03-24 08:56:54 +00:00
app_set.go Break up app.go. 2020-12-21 12:31:51 -08:00
app_set_test.go Remove uses of buildDir from java/app_set_test.go 2021-03-24 00:01:15 +00:00
app_test.go Remove extraneous calls to TestingBuildParams.RelativeToTop() 2021-03-30 20:03:22 +01:00
base.go Use trimmed lint database for mainline modules 2021-06-25 18:09:45 +00:00
boot_jars.go Exclude jacocoagent from boot jars package check 2021-06-18 12:11:17 +01:00
bootclasspath.go Add HiddenAPIScope to replace use of SdkKind 2021-06-25 16:44:30 +01:00
bootclasspath_fragment.go Calculate widest stub dex jars per module 2021-06-28 16:05:05 +01:00
bootclasspath_fragment_test.go Calculate widest stub dex jars per module 2021-06-28 16:05:05 +01:00
builder.go Support multiple rsp files in REParams 2021-03-25 11:06:45 -07:00
classpath_element.go Add ClasspathElement support 2021-06-18 21:02:10 +01:00
classpath_fragment.go Rename generate proto config file to match classpath type. 2021-05-24 13:38:45 +01:00
device_host_converter.go Clear remains of java.Dependency interface. 2021-03-05 14:57:51 +00:00
device_host_converter_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
dex.go Time out and dump stacks from R8 processes after 30 minutes 2021-04-30 14:14:46 -07:00
dexpreopt.go Add usesTargetFiles option in dexpreopt_gen 2021-05-18 12:09:28 +09:00
dexpreopt_bootjars.go Expose imageLocationsOnDevice as well as imageLocationsOnHost 2021-06-24 13:14:29 +00:00
dexpreopt_bootjars_test.go Build boot images in bootclasspath_fragment/platform_bootclasspath 2021-05-12 21:51:27 +01:00
dexpreopt_config.go Make copyBootJarsToPredefinedLocations simpler and less fragile 2021-06-16 03:06:35 +01:00
dexpreopt_test.go Skip TestDex2oatToolDeps on Darwin. 2021-05-20 17:36:22 +01:00
droiddoc.go Stop filtering html files from droidstubs input 2021-06-09 13:54:38 +01:00
droiddoc_test.go Remove extraneous calls to TestingBuildParams.RelativeToTop() 2021-03-30 20:03:22 +01:00
droidstubs.go Revert "Hacky workaround for half-finalized builds." 2021-06-13 18:15:26 -06:00
droidstubs_test.go Remove support for unsandboxed metalava 2021-03-31 13:17:42 -07:00
gen.go Take Module implementations out of java/java.go. 2021-03-19 15:46:38 -07:00
genrule.go
hiddenapi.go Maintain header order in merge_csv 2021-06-16 03:06:33 +01:00
hiddenapi_modular.go Calculate widest stub dex jars per module 2021-06-28 16:05:05 +01:00
hiddenapi_monolithic.go Fix monolithic hidden API processing with prebuilts 2021-06-22 19:16:27 +01:00
hiddenapi_singleton.go Merge "Drop "prebuilt_" prefixes from names registered in ApexInfo.InApexXxx." 2021-05-27 17:23:16 +00:00
hiddenapi_singleton_test.go Add a test for hidden API encoding of java_sdk_library 2021-05-18 07:59:29 +01:00
jacoco.go Use a default exclude filter for JaCoCo in Soong. 2020-07-08 19:29:10 +00:00
jacoco_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
java.go Add commonSdkLibraryAndImportModule interface 2021-06-23 17:46:50 +01:00
java_resources.go
java_test.go Move java_sdk_library tests to sdk_library_test.go 2021-06-02 08:06:40 -07:00
jdeps.go Convert java.Dependency to JavaInfo provider 2021-02-09 15:36:25 -08:00
jdeps_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
kotlin.go Silence kotlinc JDK9 warnings 2021-03-31 13:17:42 -07:00
kotlin_test.go Remove uses of buildDir from java/kotlin_test.go 2021-03-24 01:07:12 +00:00
legacy_core_platform_api_usage.go Merge "Add test suite to legacy core platform allowlist." am: 7d1f1cf27c am: ae3f51b415 am: a537f721d5 2021-03-17 22:07:53 +00:00
lint.go Use trimmed lint database for mainline modules 2021-06-25 18:09:45 +00:00
lint_defaults.txt Update soong for new lint version 2021-04-06 17:49:19 +00:00
lint_test.go Use trimmed lint database for mainline modules 2021-06-25 18:09:45 +00:00
platform_bootclasspath.go Verify the modular stub flags are subsets of the monolithic stub flags 2021-06-25 21:59:28 +01:00
platform_bootclasspath_test.go Fix monolithic hidden API processing with prebuilts 2021-06-22 19:16:27 +01:00
platform_compat_config.go Extract IsModuleInVersionedSdk 2021-04-28 00:39:52 +01:00
platform_compat_config_test.go Add platform_compat_config to sdk 2021-03-22 19:13:40 +00:00
plugin.go Register java_plugin in PrepareForTestWithJavaBuildComponents 2021-03-24 00:01:15 +00:00
plugin_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
prebuilt_apis.go Remove special case code for obsolete files 2021-04-13 19:09:48 +01:00
proto.go Improve java.go readability. 2021-03-15 13:58:44 -07:00
robolectric.go Merge "Support robolectric prebuilts in android_robolectric_test" am: 7314fedd37 am: d5e78d1c17 am: 6426ae5a73 2021-03-08 20:15:13 +00:00
rro.go SdkSpec is fully using ApiLevel 2021-04-12 13:46:21 +09:00
rro_test.go Remove extraneous calls to TestingBuildParams.RelativeToTop() 2021-03-30 20:03:22 +01:00
sdk.go Merge "Replace source based system server stubs" 2021-04-28 15:06:22 +00:00
sdk_library.go Ensure consistent APEX variation for java_sdk_library and java_sdk_library_import 2021-06-24 13:38:05 +01:00
sdk_library_external.go Remove global state from sysprop libraries 2021-02-26 16:28:12 -08:00
sdk_library_test.go Remove duplicate component from sdk snapshot 2021-06-23 17:46:50 +01:00
sdk_test.go Remove FixturePreparer.Extend() 2021-04-01 10:33:20 +01:00
support_libraries.go
system_modules.go Make all SdkMemberTypes support transitive member deps 2021-05-06 23:13:06 +01:00
system_modules_test.go Remove varargs from RunTest(t *testing.T) 2021-03-31 16:03:59 +01:00
systemserver_classpath_fragment.go Treat java libraries in classpath fragments as directly in apex 2021-05-27 13:14:33 -07:00
systemserver_classpath_fragment_test.go Rename generate proto config file to match classpath type. 2021-05-24 13:38:45 +01:00
testing.go Make CheckHiddenAPIRuleInputs more reusable 2021-06-22 19:16:27 +01:00
tradefed.go