Skip to content
Snippets Groups Projects
Commit f9a3c6a3 authored by Paul Duffin's avatar Paul Duffin
Browse files

Enable nearby to perform its own hidden API processing

Previously, the hidden API encoding of the nearby boot dex jars, i.e.
those dex jars that nearby contributes to the bootclasspath were done
as part of the monolithic hidden API processing. This change causes
the encoding to be done by the nearby's bootclasspath_fragment.

This change involves the following:
* Addition of the fragments property to the nearby's
  bootclasspath_fragment module to list all the other
  bootclasspath_fragment modules on which this depends.
* Addition of the additional_stubs property to add stubs for APIs that
  are not provided by another bootclasspath_fragment.

The build automatically checks that the hidden API flags which are
computed by nearby and encoded into its boot dex jars match those that
are generated by the monolithic processing so this is guaranteed to be
safe.

Bug: 179354495
Test: m com.android.nearby
      - ensure that the generated APEX is byte-for-byte identical
        before and after these changes.
      m out/soong/hiddenapi/hiddenapi-flags.csv
      - make sure that they are not changed by this.
Change-Id: Ibf669b25ed8a5f0ff02aa49dccb1a20dfdf4e824
parent de251b0f
No related branches found
No related tags found
No related merge requests found
......@@ -54,4 +54,18 @@ bootclasspath_fragment {
name: "com.android.nearby-bootclasspath-fragment",
contents: ["framework-nearby"],
apex_available: ["com.android.nearby"],
// The bootclasspath_fragments that provide APIs on which this depends.
fragments: [
{
apex: "com.android.art",
module: "art-bootclasspath-fragment",
},
],
// Additional stubs libraries that this fragment's contents use which are
// not provided by another bootclasspath_fragment.
additional_stubs: [
"android-non-updatable",
],
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment