From 1364891fad13901c3b47d31e9d9dfaaf04ecaa79 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 15 Jul 2022 13:12:35 +0000 Subject: Use implementation jar for updatable-media in snapshot for S While enabling prebuilts in T we hit b/229932396 which was caused by some parts of the build depending on the prebuilt updatable-media jar which used to be a full implementation jar but which is now an invalid jar as the snapshot must not be including implementation details. We fixed the issue in T but we are hitting the same problem in S with the M-2022-07. That is the first train in which the prebuilt updatable-media module provides an invalid jar, prior to that it was always providing an implementation jar. This change tweaks the sdk snapshot generation code to use an implementation jar for updatable-media in the S snapshot to avoid partners having to cherry pick changes similar to those needed to fix b/229932396 in T. Bug: 239121291 Test: packages/modules/common/build/mainline_modules_sdks.sh # Check that S media snapshot includes implementation jar. # Check that S art snapshot includes invalid jar. # Check that T media snapshot includes invalid jar. Change-Id: Ib49484d00a60b4ed7f8268e04f9c10a3498edb56 --- sdk/update.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sdk/update.go') diff --git a/sdk/update.go b/sdk/update.go index b9ef3d0f4..995da741c 100644 --- a/sdk/update.go +++ b/sdk/update.go @@ -1972,6 +1972,12 @@ func (m *memberContext) RequiresTrait(trait android.SdkMemberTrait) bool { return m.requiredTraits.Contains(trait) } +func (m *memberContext) IsTargetBuildBeforeTiramisu() bool { + return m.builder.targetBuildRelease.EarlierThan(buildReleaseT) +} + +var _ android.SdkMemberContext = (*memberContext)(nil) + func (s *sdk) createMemberSnapshot(ctx *memberContext, member *sdkMember, bpModule *bpModule) { memberType := member.memberType -- cgit v1.2.3-59-g8ed1b