diff options
Diffstat (limited to 'android/sdk.go')
| -rw-r--r-- | android/sdk.go | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/android/sdk.go b/android/sdk.go index 63e0bbeec..4bcbe2e7a 100644 --- a/android/sdk.go +++ b/android/sdk.go @@ -513,6 +513,9 @@ type SdkMemberType interface { // SupportedLinkages returns the names of the linkage variants supported by this module. SupportedLinkages() []string + // DisablesStrip returns true if the stripping needs to be disabled for this module. + DisablesStrip() bool + // ArePrebuiltsRequired returns true if prebuilts are required in the sdk snapshot, false // otherwise. ArePrebuiltsRequired() bool @@ -618,6 +621,9 @@ type SdkMemberTypeBase struct { // The names of linkage variants supported by this module. SupportedLinkageNames []string + // StripDisabled returns true if the stripping needs to be disabled for this module. + StripDisabled bool + // When set to true BpPropertyNotRequired indicates that the member type does not require the // property to be specifiable in an Android.bp file. BpPropertyNotRequired bool @@ -689,6 +695,10 @@ func (b *SdkMemberTypeBase) SupportedLinkages() []string { return b.SupportedLinkageNames } +func (b *SdkMemberTypeBase) DisablesStrip() bool { + return b.StripDisabled +} + // registeredModuleExportsMemberTypes is the set of registered SdkMemberTypes for module_exports // modules. var registeredModuleExportsMemberTypes = &sdkRegistry{} @@ -830,6 +840,9 @@ type SdkMemberContext interface { // IsTargetBuildBeforeTiramisu return true if the target build release for which this snapshot is // being generated is before Tiramisu, i.e. S. IsTargetBuildBeforeTiramisu() bool + + // ModuleErrorf reports an error at the line number of the module type in the module definition. + ModuleErrorf(fmt string, args ...interface{}) } // ExportedComponentsInfo contains information about the components that this module exports to an @@ -857,11 +870,19 @@ type ExportedComponentsInfo struct { Components []string } -var ExportedComponentsInfoProvider = blueprint.NewProvider(ExportedComponentsInfo{}) +var ExportedComponentsInfoProvider = blueprint.NewProvider[ExportedComponentsInfo]() // AdditionalSdkInfo contains additional properties to add to the generated SDK info file. type AdditionalSdkInfo struct { Properties map[string]interface{} } -var AdditionalSdkInfoProvider = blueprint.NewProvider(AdditionalSdkInfo{}) +var AdditionalSdkInfoProvider = blueprint.NewProvider[AdditionalSdkInfo]() + +var apiFingerprintPathKey = NewOnceKey("apiFingerprintPathKey") + +func ApiFingerprintPath(ctx PathContext) OutputPath { + return ctx.Config().Once(apiFingerprintPathKey, func() interface{} { + return PathForOutput(ctx, "api_fingerprint.txt") + }).(OutputPath) +} |