diff options
Diffstat (limited to 'sdk/sdk.go')
-rw-r--r-- | sdk/sdk.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sdk/sdk.go b/sdk/sdk.go index 2d93911cf..ac6fce989 100644 --- a/sdk/sdk.go +++ b/sdk/sdk.go @@ -16,6 +16,7 @@ package sdk import ( "fmt" + "io" "strconv" "github.com/google/blueprint" @@ -50,6 +51,8 @@ type sdkProperties struct { Java_libs []string // The list of native libraries in this SDK Native_shared_libs []string + // The list of stub sources in this SDK + Stubs_sources []string Snapshot bool `blueprint:"mutated"` } @@ -121,6 +124,13 @@ func (s *sdk) AndroidMkEntries() android.AndroidMkEntries { OutputFile: s.snapshotFile, DistFile: s.snapshotFile, Include: "$(BUILD_PHONY_PACKAGE)", + ExtraFooters: []android.AndroidMkExtraFootersFunc{ + func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) { + // Allow the sdk to be built by simply passing its name on the command line. + fmt.Fprintln(w, ".PHONY:", s.Name()) + fmt.Fprintln(w, s.Name()+":", s.snapshotFile.String()) + }, + }, } } @@ -167,6 +177,7 @@ type sdkMemberVesionedDepTag struct { func memberMutator(mctx android.BottomUpMutatorContext) { if m, ok := mctx.Module().(*sdk); ok { mctx.AddVariationDependencies(nil, sdkMemberDepTag, m.properties.Java_libs...) + mctx.AddVariationDependencies(nil, sdkMemberDepTag, m.properties.Stubs_sources...) targets := mctx.MultiTargets() for _, target := range targets { |