Export the name of stub java Soong modules
build/make has several hardcoded references to these modules. In
preparation for switching between stubs generated from .txt files,
export these module names to Make. This prevents duplication of stub
selection logic in multiple places.
Test: TH
Change-Id: I5b1ef27aaea269d60aa7953787ea10d1b2a793f2
diff --git a/android/sdk_version.go b/android/sdk_version.go
index cace88a..842b849 100644
--- a/android/sdk_version.go
+++ b/android/sdk_version.go
@@ -350,3 +350,18 @@
}
return true
}
+
+func init() {
+ RegisterMakeVarsProvider(pctx, javaSdkMakeVars)
+}
+
+// Export the name of the soong modules representing the various Java API surfaces.
+func javaSdkMakeVars(ctx MakeVarsContext) {
+ ctx.Strict("ANDROID_PUBLIC_STUBS", SdkPublic.JavaLibraryName(ctx.Config()))
+ ctx.Strict("ANDROID_SYSTEM_STUBS", SdkSystem.JavaLibraryName(ctx.Config()))
+ ctx.Strict("ANDROID_TEST_STUBS", SdkTest.JavaLibraryName(ctx.Config()))
+ ctx.Strict("ANDROID_MODULE_LIB_STUBS", SdkModule.JavaLibraryName(ctx.Config()))
+ ctx.Strict("ANDROID_SYSTEM_SERVER_STUBS", SdkSystemServer.JavaLibraryName(ctx.Config()))
+ // TODO (jihoonkang): Create a .txt equivalent for core.current.stubs
+ ctx.Strict("ANDROID_CORE_STUBS", SdkCore.JavaLibraryName(ctx.Config()))
+}