summaryrefslogtreecommitdiff
path: root/android/sdk.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-04-28 00:39:52 +0100
committer Paul Duffin <paulduffin@google.com> 2021-04-28 00:39:52 +0100
commit0c2e08312cdb9f9c568e4894912d0d3031cb6557 (patch)
treedd0be717cfcfb8b8390b8391e0aa5cfe252a9414 /android/sdk.go
parent59dc69c2c7b0d0e8a6c99306ff2089e3c71e6ce5 (diff)
Extract IsModuleInVersionedSdk
Bug: 177892522 Test: m nothing Change-Id: I348d380a0d29abdd6a84420be52cc1b674f2a7ab
Diffstat (limited to 'android/sdk.go')
-rw-r--r--android/sdk.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/android/sdk.go b/android/sdk.go
index 5521f4a31..6fc1910d0 100644
--- a/android/sdk.go
+++ b/android/sdk.go
@@ -171,6 +171,16 @@ func InitSdkAwareModule(m SdkAware) {
m.AddProperties(&base.properties)
}
+// IsModuleInVersionedSdk returns true if the module is an versioned sdk.
+func IsModuleInVersionedSdk(module Module) bool {
+ if s, ok := module.(SdkAware); ok {
+ if !s.ContainingSdk().Unversioned() {
+ return true
+ }
+ }
+ return false
+}
+
// Provide support for generating the build rules which will build the snapshot.
type SnapshotBuilder interface {
// Copy src to the dest (which is a snapshot relative path) and add the dest