platform_build_soong/java
Ulya Trafimovich 18554243de Add nested class loader subcontext at the proper hierarchy level.
When adding a subcontext in a class loader context tree, there are two
possible cases: 1) the root of the subcontext is itself a <uses-library>
and should be present as a node in the tree, or 2) the root is not a
<uses-library>, but some of its dependencies are -- in that case they
should be disconnected from the root, and the resulting forrest should
be added at the top-level.

Example:

  1) C is a <uses-library>:

     A
     ├── B
     └── C
         ├── D
         └── E
             └── F

  2) C is not a <uses-library>:

     A
     ├── B
     ├── D
     └── E
         └── F

Before the patch subcontexts for transitive dependencies were added
before the subcontext for the direct dependency (even if it was a
<uses-library>, resulting in case-2 hierarchy when case-1 should have
been used. Previosuly this didn't matter because class loader context
was a flat set of libraries, but now it matters because class loader
context is a tree.

This patch changes the order in which libraries are added, so that
direct dependencies are added before transitive ones. The context adding
method now accepts an "implicit root" parameter, so that when adding
transitive dependencies it can check if the corresponding direct
dependency is a <uses-library> and already present in the context.

Partially constructed class loader context is now propagated top-down
into aapt.buildActions, so that the method can use existing part of the
context to decide where the missing part should be connected.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I649aff9e27494306885a4f4fc90226c399636b57
2020-11-16 14:57:05 +00:00
..
config Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709) 2020-08-29 01:17:45 -07:00
aapt2.go
aar.go Add nested class loader subcontext at the proper hierarchy level. 2020-11-16 14:57:05 +00:00
Android.bp Move boot jars package check from make 2020-10-29 17:20:06 +00:00
android_manifest.go Rework class loader context implementation. 2020-11-03 15:15:46 +00:00
android_resources.go Apply PRODUCT_ENFORCE_RRO_TARGETS to dependencies. 2020-10-12 10:34:36 -07:00
androidmk.go Rework class loader context implementation. 2020-11-03 15:15:46 +00:00
androidmk_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
app.go Add nested class loader subcontext at the proper hierarchy level. 2020-11-16 14:57:05 +00:00
app_builder.go Merge "Merge Android R" 2020-09-10 17:22:09 +00:00
app_test.go Rework class loader context implementation. 2020-11-03 15:15:46 +00:00
boot_jars.go Move boot jars package check from make 2020-10-29 17:20:06 +00:00
builder.go Check UseRBE is set before replacing any template with the RE version. 2020-09-03 01:29:49 -04:00
device_host_converter.go Rework class loader context implementation. 2020-11-03 15:15:46 +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 Fix proguard_usage.zip with USE_RBE=true RBE_R8=true 2020-09-17 18:56:43 +00:00
dexpreopt.go Rework class loader context implementation. 2020-11-03 15:15:46 +00:00
dexpreopt_bootjars.go Rename ART release APEX to com.android.art. 2020-10-21 15:41:02 +01:00
dexpreopt_bootjars_test.go Cleanup usages of CreateConfiguredJarList 2020-10-27 10:36:29 +00:00
dexpreopt_config.go Retry: Make ConfiguredJarList immutable 2020-10-27 17:37:20 +00:00
dexpreopt_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
droiddoc.go Make highmem classification of metalava optional 2020-10-26 11:38:40 +00:00
gen.go
genrule.go
hiddenapi.go Rename class2greylist 2020-08-13 17:33:14 +01:00
hiddenapi_singleton.go Tag removed APIs as such in hiddenapi_flags.csv. 2020-10-21 15:52:15 +01:00
hiddenapi_singleton_test.go Cleanup usages of CreateConfiguredJarList 2020-10-27 10:36:29 +00: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 nested class loader subcontext at the proper hierarchy level. 2020-11-16 14:57:05 +00:00
java_resources.go
java_test.go Rework class loader context implementation. 2020-11-03 15:15:46 +00:00
jdeps.go Add soong cc and java deps to general-tests dist 2020-07-07 22:41:31 +00:00
jdeps_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
kotlin.go Support kotlin multiplatform sources 2020-07-06 17:58:09 -07:00
kotlin_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
legacy_core_platform_api_usage.go Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709) 2020-08-29 01:17:45 -07:00
lint.go Remove global state from apex modules 2020-10-06 13:39:57 -07:00
lint_defaults.txt Add support for running Android lint on java and android modules. 2020-06-18 11:01:47 -07:00
OWNERS
platform_compat_config.go
plugin.go Consolidate adding common java properties 2020-06-18 11:01:47 -07:00
plugin_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
prebuilt_apis.go Add imports_compile_dex to prebuilt_apis 2020-09-02 09:27:35 -07:00
proto.go
robolectric.go Make robolectric runtimes a host module 2020-09-15 11:26:12 -07:00
sdk.go Add support for using sdk_version: "module_<ver>" 2020-09-30 16:20:17 +01:00
sdk_library.go Make test api extend system in sdk_library.go 2020-10-13 08:25:00 +01:00
sdk_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
support_libraries.go
sysprop.go
system_modules.go
testing.go Unify handling of compat and normal libs in class loader contexts. 2020-10-27 17:05:30 +00:00
tradefed.go