Expose the minimum supported SDK version to make.
Right now this is hard coded in two places (here and in
core/binary.mk). Keep it in one place so it's easier to change.
Test: make checkbuild
Bug: None
Change-Id: I2a2c784d4c667b326f871e6144db92753c16c85f
diff --git a/android/makevars.go b/android/makevars.go
index 482fbde..024e015 100644
--- a/android/makevars.go
+++ b/android/makevars.go
@@ -19,11 +19,20 @@
"fmt"
"io/ioutil"
"os"
+ "strconv"
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
)
+func init() {
+ RegisterMakeVarsProvider(pctx, androidMakeVarsProvider)
+}
+
+func androidMakeVarsProvider(ctx MakeVarsContext) {
+ ctx.Strict("MIN_SUPPORTED_SDK_VERSION", strconv.Itoa(ctx.Config().MinSupportedSdkVersion()))
+}
+
///////////////////////////////////////////////////////////////////////////////
// Interface for other packages to use to declare make variables
type MakeVarsContext interface {