summaryrefslogtreecommitdiff
path: root/java/systemserver_classpath_fragment.go
AgeCommit message (Collapse)Author
2022-07-05Stop exporting systemserverclasspath_fragment when targeting SPaul Duffin
Previously, when targeting the S release the generated sdk snapshot would contain prebuilt_systemserverclasspath_fragment modules even though they were only added in T. This allows SdkMemberTypes to specify the set of target build releases they support and ignores them when targeting an unsupported target build release. The Merged-In value was chosen to prevent this from being merged into branches where it will conflict due to https://r.android.com/2105804. That will allow this change to be submitted in tm-dev before it is submitted in AOSP. Test: m nothing packages/modules/common/build/mainline_modules_sdks.sh # Check that the for-S-build snapshots do not include SSCPFs. Bug: 237718221 Change-Id: I2df08c2fcebf9b866695d691572a9d3783758b17 Merged-In: Ib6d1b72bc8399fbb39075494ae37da92f4b28d03
2021-12-20Dexpreopt standalone system server jars.Jiakai Zhang
Standalone system server jars are dynamically loaded by system server using a `PathClassLoader` whose parent is `SYSTEMSERVERCLASSPATH`. They are listed in `PRODUCT_STANDALONE_SYSTEM_SERVER_JARS` and `PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS` in Makefile. We need to dexpreopt them to achieve better performance. Bug: 203198541 Test: m nothing Test: - 1. Add a standalone system server jar (e.g., by patching aosp/1906158) 2. Build a system image. 3. See the odex and vdex files generated in $ANDROID_PRODUCT_OUT/system/framework/oat/ 4. Flash the image to a device. 5. Run `atest art_standalone_dexpreopt_tests`. Change-Id: I358a62d34989c5c8eba12e18fe6167e0b72ff69d
2021-11-30Add entries for STANDALONE_SYSTEMSERVER_JARS to systemserverclasspath.pbJiakai Zhang
This CL updates platform_systemserverclasspath, systemserverclasspath_fragment, and prebuilt_systemserverclasspath_fragment to write entries for STANDALONE_SYSTEMSERVER_JARS to systemserverclasspath.pb. A new property `standalone_contents` is aded to `systemserverclasspath_fragment` and `prebuilt_systemserverclasspath_fragment` to list the standalone system server jars in the APEX, and entries will be written to systemserverclasspath.pb accordingly at build time. To add more context, these entries will be consumed by derive_classpath in order to generate an environment variable PRODUCT_STANDALONE_SYSTEM_SERVER_JARS. The environment variable will then be comsumed by odrefresh to determine what jars to preopt on early boot. Note that the variable should not end with "CLASSPATH" because the list is not used by runtime as a classpath. It is just a colon-separated list of jars. System server loads the jars separately with paths hardcoded in the code. Bug: 203198541 Test: manual - 1. Add some jars to PRODUCT_STANDALONE_SYSTEM_SERVER_JARS 2. Add some other jars to PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS and standalone_contents. 3. Build an image. 4. Flash the image to a device. 5. adb shell echo \$STANDALONE_SYSTEMSERVER_JARS 6. See the correct list of jars. Change-Id: I09a6fd1d3db85c194330da9b751702a9bf069e26
2021-11-17Make CompOS library optional in PRODUCT_APEX_SYSTEM_SERVER_JARSAlan Stokes
CompOS is an optional module so it may legitimately be omitted from some products. Bug: 199147668 Test: Builds if PRODUCT_ISOLATED_COMPILATION_ENABLED not set Change-Id: I4e031ca6184d920b64f9c370d35b5525ecbe8a1f
2021-10-28Add exemption for test_framework-apexd and test_service-apexd jarsSamiul Islam
For testing purpose, we need to add java libraries to bootclasspath and systemserverclasspath that are not present in PRODUCT_APEX_BOOT_JARS and PRODUCT_APEX_SYSTEM_SERVER_JARS. Currently, we can't unconditionally add all the contents to the config for test APEXs. Until a formal way is introduced, hardcoding the artifact in the build system like how it's done for test_framework-sdkextensions. Bug: 187444679 Test: atest ApexTestCases Test: atest StagedInstallInternalTest Change-Id: I1f7b01a57bc9c46163e025de2ab00e671a42b202
2021-10-28Make car apex's library optional in PRODUCT_APEX_SYSTEM_SERVER_JARSKeun young Park
- car-frameworks-service-module is added from com.android.car.framework apex which only exisits in car products. Bug: 203233647 Bug: 203201931 Test: build, bootup Change-Id: I5f13b0505c1ac4fd2fd7b6559e080c8a6fb526e0 Merged-In: I5f13b0505c1ac4fd2fd7b6559e080c8a6fb526e0 (cherry picked from commit 6e3ba9ac3bb53eb565e98d3b7fb46e85e26f19ce)
2021-10-04Update variable name in error messages.Ulya Trafimovich
Variable PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS was renamed to PRODUCT_APEX_SYSTEM_SERVER_JARS in https://r.android.com/1779472. Bug: 191127295 Test: m nothing Change-Id: I0c8ae839cab443c824760b40d30b4374982010f9
2021-09-30Generate prebuilt_systemserverclasspath_fragment.Jiakai Zhang
Bug: 194150908 Test: m nothing Test: manual - 1. Patch aosp/1835087. 2. m out/soong/.intermediates/art/build/sdk/art-module-sdk/common_os/snapshot/Android.bp 3. See prebuilt_systemserverclasspath_fragment modules and systemserverclasspath_fragments in an sdk_snapshot module. Change-Id: I7876b077b0b4ed190f01dbfa9533de04ea32d524
2021-09-30Add exported_systemserverclasspath_fragments to prebuilt_apex rule.Jiakai Zhang
This is for exporting the contents of systemserverclasspath_fragment for dexpreopting. Bug: 194150908 Test: manual - 1. Patch aosp/1818020 and aosp/1834534 2. m SOONG_CONFIG_art_module_source_build=false com.android.art Change-Id: I7d2d2e02869d8a523f7c0efbbff81706672a95c5
2021-09-30Add prebuilt_systemserverclasspath_fragment rule.Jiakai Zhang
This is the prebuilt side of systemserverclasspath_fragment, currently for used for dexpreopting. The change to automactially generate prebuilt_systemserverclasspath_fragment rules will be in a separate CL. Bug: 194150908 Test: m nothing Change-Id: Ibf5322f80f78ac3ca037489f4a279456fe38a23f
2021-09-16Prevent systemserverclasspath_fragment from depending on prebuiltsPaul Duffin
When TARGET_BUILD_APPS is set then TARGET_BUILD_USE_PREBUILT_SDKS=true which causes all java_sdk_library_import modules to be treated as prefer:true. That breaks the build when the systemserverclasspath_fragment's content property references a source java_sdk_library module that has a corresponding java_sdk_library_import prebuilt module. This fixes the issue by marking the dependency from the systemserverclasspath_fragment to the source module as one that must not be replaced with a reference to the prebuilt module. Test: - update art prebuilts to include service-art m TARGET_BUILD_APPS=Calendar apps_only - fails before, works afterwards Bug: 199116972 Change-Id: Ia2d8ce7bb7e644336a42c901f7fb8ea50fd67909
2021-08-16Make sure that classpath fragment contents appear in make vars.satayev
The source of truth for what jars are in BOOTCLASSPATH and SYSTEMSERVERCLASSPATH is make; adding a classpath fragment in soong with a new jar in the contents without having it declared in make is wrong (excluding test apexes). Bug: 191369843 Test: m nothing Change-Id: Ifd313776ee7ad206031244534ed3870126e4f835
2021-07-28Rename UpdatableSystemServerJars to ApexSystemServerJars.satayev
This is consistent with naming for boot jars, e.g. ApexBootJars. Bug: 191127295 Test: presubmit Change-Id: I6e8828d55ac86b7f5260ed7f8d4eca1c0b3dced8
2021-07-22Rename UpdatableBootJars to ApexBootJars.satayev
Note that ART apex boot jars and core-icu4j are exceptions here as they are not part of ApexBootJars. ART apex boot jars are defined in their own variable, while core-icu4j is treated as a regular non-updatable boot jar. Bug: 191127295 Test: atest CtsClasspathsTestCases Change-Id: I3cea3d82ef521655a1a5ffa8cae2258ab9d08bfc
2021-06-29Use both module name and stem name to filter updatable boot jarsPaul Duffin
Sometimes the stem property is set to change both the installed file name and the name use to filter the configured module list, e.g. when adding a test library to replace the standard library, e.g. test_foo instead of foo. Sometimes it is used just to change the installed file name. This change uses both to filter the updatable boot jars and not just the stem. Bug: 180105615 Test: m nothing Change-Id: I6c459fc3597b1e4f062bc9a4e52843305b538c5f
2021-06-22Append platform classpath proto configs with missing apex jars.satayev
Any apex classpath fragment that doesn't generate its own classpaths proto, must still propagate it's boot jars for the platform classpath fragment to include for complete CLASSPATH variables on device. Bug: 191127295 Test: atest CtsClasspathsTestCases derive_classpath_test Change-Id: I93687f69006741fcd66eb6e04891a4b4bbcc3b47
2021-06-21Merge "AIDEGen: Collect dependencies info from APEX module."Treehugger Robot
2021-06-16Rename ClasspathFragmentToConfiguredJarList methods to configuredJars.satayev
They are internal implementation details of individual fragments. Bug: 191127295 Test: m Change-Id: Ib350135f5f6720741492f362f7b3203e5107772e
2021-06-15AIDEGen: Collect dependencies info from APEX module.bralee
Add apex dependencies. Bug: 188004865 Test: 1. aidegen frameworks/base/apex/appsearch frameworks/base/apex/appsearch/testing frameworks/base/services/tests/servicestests frameworks/base/core/tests/coretests cts/tests/appsearch external/icing vendor/google_testing/integration/tests/scenarios 2. The dependency graph shows it is workable to provide the result to let IDE's [Project structure] to include the service-appsearch as source directory. Change-Id: Ifd1548f0a86c1c73f8279e8ecea67756aeb1281e
2021-05-27Merge changes I0116f5f4,I950c9b54,I967f5c42Colin Cross
* changes: Treat java libraries in classpath fragments as directly in apex Make CopyDirectlyInAnyApex match the documentation Remove unused cc.copyDirectlyInAnyApexDependencyTag
2021-05-26Treat java libraries in classpath fragments as directly in apexColin Cross
Coverage is applied to java libraries that are directly in an apex. Mark java libraries that are in an apex through a bootclasspath_fragment or a systemserverclasspath_fragment as directly in the apex by implementing CopyDirectlyInAnyApexTag on the dependency tags used for their contents. Bug: 183759446 Test: TestApexJavaCoverage Change-Id: I0116f5f415083b5194000988cb257454ef115200
2021-05-26Use stem when filtering boot jars.satayev
For testing purposes, a boot jar may be provided by a test java_library that has a different content name, but sets "stem" property to match the original java_library. Given that Stem() returns either the property value or module name, it is safe to replace all content names by their stems. Bug: 180105615 Test: atest CtsClasspathsTestCases sdkextensions_e2e_tests Merged-In: Ic519ffa0c5b616abddf15b41c934421dfac2e78a Change-Id: Ic519ffa0c5b616abddf15b41c934421dfac2e78a
2021-05-24Populate individual systemserverclasspath_fragments' proto configs.satayev
Bug: 180105615 Test: m && launch_cvd; atest CtsClasspathsTestCases Change-Id: Ic0ae897e9baca75dcc022d84656496563645e74e
2021-05-20Populate individual classpath_fragments' classpaths.proto configs.satayev
To avoid duplicates on *CLASSPATH environ variables at runtime, remove split entries from platform-*classpath, i.e. all updatable jars that have their own classpath fragments should not appear in the platform-*classpath's classpaths.proto config. Bug: 180105615 Test: m && launch_cvd; atest CtsClasspathsTestCases Change-Id: Id2759ab8e106cc183e695bf3509a6ab60ab0ef2a Merged-In: Id2759ab8e106cc183e695bf3509a6ab60ab0ef2a
2021-05-17Add systemserverclasspath_fragments property to apex.satayev
- All contents of the fragment are added as java_lib dependencies. - Generated classpaths.proto is added into etc as required. Bug: 180105615 Test: m nothing Change-Id: I8e8e8b019c4ca2909182f205a47deffa946de6da
2021-05-17Add "contents" property to systemserverclasspath_fragment.satayev
Similar to bcp_fragment's contents, this property lists all java library contributions made by this fragment. Bug: 180105615 Test: m nothing Change-Id: Ifb1f54d5db290fffaa31933d15207014bb72d2fb
2021-05-17Add no-op systemserverclasspath_fragment module.satayev
This would allow to start introducing these modules for apexes that contribute to SYSTEMSERVERCLASSPATH. In follow up, it will be evolved: - platform_systemserverclasspath would have "fragments" property to list all individual systemserverclasspath_fragments; - systemserverclasspath_fragment would have "contents" property to list contibuting java libs; - systemserverclasspath_fragment would generate non-empty classpaths.proto config within individual apexes. Bug: 180105615 Test: m nothing Change-Id: Ibaaa3fae5f1eab9a41ceecc1214a53be6bbc8ba6
2021-05-07Declare ConfiguredJarList in specific fragment implementations.satayev
Each specific classpath_fragment module knows what jars must be part of the corresponding classpaths.proto config. Note that bootclasspath_fragment does not implement classpath_fragment yet, thus all boot jars and all system server jars go into corresponding platform classpaths. Bug: 180105615 Test: m && launch_cvd; atest CtsClasspathsTestCases Change-Id: I6a8c7b0a5d17d62e790a441b8e2c5c1a816e7f30
2021-05-07Split SYSTEMSERVERCLASSPATH entries from platform_bootclasspath.satayev
Boot jars are different to system server jars at build level, due to added complexity of dexpreopt. As a logical separation add a new classpath fragment type and split existing classpaths.proto generation into relevant pieces. Bug: 180105615 Test: m && launch_cvd; atest CtsClasspathsTestCases Change-Id: I88bec09fc920166ffd0092faef980754ddeb6593