platform_build_soong/apex/Android.bp
Paul Duffin 4e7d1c43e2 Add apexes property to sdk
Specifying an apex in the apexes propety will cause all the
*classpath_fragments that are contents of the APEX to be automatically
added as members of the sdk and appear in the snapshot.

The purpose of this change is to dedup the APEX and sdk definitions and
try and avoid some of the issues that we have been finding while
attempting to build against the prebuilts.

Two tests, one each for bootclasspath_fragment and
systemserverclasspath_fragment, have been refactored to compare the
output when adding the *fragment to the sdk directly of via the APEX.
That ensures switching to use the APEX will not change the sdk snapshot
unless it was previously missing a *fragment.

There was also a slight difference in where the hidden API flags were
copied from. That should have no impact on the output as the flags are
identical.

The sdk snapshot generation needed some tweaks to avoid generating a
prebuilt for the APEX.

Bug: 232401814
Test: m nothing
Change-Id: I7aaf16a3a0ab4bebf97765d1484215cc008dc4b8
2022-07-06 15:58:43 +00:00

45 lines
1,018 B
Text

package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
bootstrap_go_package {
name: "soong-apex",
pkgPath: "android/soong/apex",
deps: [
"blueprint",
"soong",
"soong-android",
"soong-bazel",
"soong-bpf",
"soong-cc",
"soong-filesystem",
"soong-java",
"soong-multitree",
"soong-provenance",
"soong-python",
"soong-rust",
"soong-sh",
],
srcs: [
"androidmk.go",
"apex.go",
"apex_sdk_member.go",
"apex_singleton.go",
"builder.go",
"constants.go",
"deapexer.go",
"key.go",
"prebuilt.go",
"testing.go",
"vndk.go",
],
testSrcs: [
"apex_test.go",
"bootclasspath_fragment_test.go",
"classpath_element_test.go",
"platform_bootclasspath_test.go",
"systemserver_classpath_fragment_test.go",
"vndk_test.go",
],
pluginFor: ["soong_build"],
}