summaryrefslogtreecommitdiff
path: root/java/systemserver_classpath_fragment.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2022-05-13 13:12:19 +0000
committer Paul Duffin <paulduffin@google.com> 2022-07-06 15:58:43 +0000
commit4e7d1c43e27cc484cf598a7d683b0a41363d6f97 (patch)
treef68370057030155619dfd77f34c9ace1154409f3 /java/systemserver_classpath_fragment.go
parent014fded49d365a5700a28c1080590f2004c763cb (diff)
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
Diffstat (limited to 'java/systemserver_classpath_fragment.go')
-rw-r--r--java/systemserver_classpath_fragment.go21
1 files changed, 12 insertions, 9 deletions
diff --git a/java/systemserver_classpath_fragment.go b/java/systemserver_classpath_fragment.go
index 79d2ee9f7..a2cd2619a 100644
--- a/java/systemserver_classpath_fragment.go
+++ b/java/systemserver_classpath_fragment.go
@@ -24,15 +24,7 @@ import (
func init() {
registerSystemserverClasspathBuildComponents(android.InitRegistrationContext)
- android.RegisterSdkMemberType(&systemServerClasspathFragmentMemberType{
- SdkMemberTypeBase: android.SdkMemberTypeBase{
- PropertyName: "systemserverclasspath_fragments",
- SupportsSdk: true,
-
- // This was only added in Tiramisu.
- SupportedBuildReleaseSpecification: "Tiramisu+",
- },
- })
+ android.RegisterSdkMemberType(SystemServerClasspathFragmentSdkMemberType)
}
func registerSystemserverClasspathBuildComponents(ctx android.RegistrationContext) {
@@ -41,6 +33,17 @@ func registerSystemserverClasspathBuildComponents(ctx android.RegistrationContex
ctx.RegisterModuleType("prebuilt_systemserverclasspath_fragment", prebuiltSystemServerClasspathModuleFactory)
}
+var SystemServerClasspathFragmentSdkMemberType = &systemServerClasspathFragmentMemberType{
+ SdkMemberTypeBase: android.SdkMemberTypeBase{
+ PropertyName: "systemserverclasspath_fragments",
+ SupportsSdk: true,
+
+ // Support for adding systemserverclasspath_fragments to the sdk snapshot was only added in
+ // Tiramisu.
+ SupportedBuildReleaseSpecification: "Tiramisu+",
+ },
+}
+
type platformSystemServerClasspathModule struct {
android.ModuleBase