summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/hiddenapi_singleton.go2
-rw-r--r--java/sdk_library.go27
2 files changed, 24 insertions, 5 deletions
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go
index 1f80e777f..e57f32337 100644
--- a/java/hiddenapi_singleton.go
+++ b/java/hiddenapi_singleton.go
@@ -255,7 +255,7 @@ func flagsRule(ctx android.SingletonContext) android.Path {
FlagWithInput("--max-target-p ",
android.PathForSource(ctx, "frameworks/base/config/hiddenapi-max-target-p.txt")).
FlagWithInput("--max-target-o ", android.PathForSource(
- ctx, "frameworks/base/config/hiddenapi-max-target-o.txt")).Flag("--ignore-conflicts ").
+ ctx, "frameworks/base/config/hiddenapi-max-target-o.txt")).Flag("--ignore-conflicts ").FlagWithArg("--tag ", "lo-prio").
FlagWithInput("--blocked ",
android.PathForSource(ctx, "frameworks/base/config/hiddenapi-force-blocked.txt")).
FlagWithInput("--blocked ",
diff --git a/java/sdk_library.go b/java/sdk_library.go
index ebf867d73..603c80854 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -438,6 +438,21 @@ type sdkLibraryProperties struct {
// If set to true then don't create dist rules.
No_dist *bool
+ // The stem for the artifacts that are copied to the dist, if not specified
+ // then defaults to the base module name.
+ //
+ // For each scope the following artifacts are copied to the apistubs/<scope>
+ // directory in the dist.
+ // * stubs impl jar -> <dist-stem>.jar
+ // * API specification file -> api/<dist-stem>.txt
+ // * Removed API specification file -> api/<dist-stem>-removed.txt
+ //
+ // Also used to construct the name of the filegroup (created by prebuilt_apis)
+ // that references the latest released API and remove API specification files.
+ // * API specification filegroup -> <dist-stem>.api.<scope>.latest
+ // * Removed API specification filegroup -> <dist-stem>-removed.api.<scope>.latest
+ Dist_stem *string
+
// indicates whether system and test apis should be generated.
Generate_system_and_test_apis bool `blueprint:"mutated"`
@@ -1117,12 +1132,16 @@ func (module *SdkLibrary) sdkVersionForStubsLibrary(mctx android.EarlyModuleCont
}
}
+func (module *SdkLibrary) distStem() string {
+ return proptools.StringDefault(module.sdkLibraryProperties.Dist_stem, module.BaseModuleName())
+}
+
func (module *SdkLibrary) latestApiFilegroupName(apiScope *apiScope) string {
- return ":" + module.BaseModuleName() + ".api." + apiScope.name + ".latest"
+ return ":" + module.distStem() + ".api." + apiScope.name + ".latest"
}
func (module *SdkLibrary) latestRemovedApiFilegroupName(apiScope *apiScope) string {
- return ":" + module.BaseModuleName() + "-removed.api." + apiScope.name + ".latest"
+ return ":" + module.distStem() + "-removed.api." + apiScope.name + ".latest"
}
func childModuleVisibility(childVisibility []string) []string {
@@ -1228,7 +1247,7 @@ func (module *SdkLibrary) createStubsLibrary(mctx android.DefaultableHookContext
// Dist the class jar artifact for sdk builds.
if !Bool(module.sdkLibraryProperties.No_dist) {
props.Dist.Targets = []string{"sdk", "win_sdk"}
- props.Dist.Dest = proptools.StringPtr(fmt.Sprintf("%v.jar", module.BaseModuleName()))
+ props.Dist.Dest = proptools.StringPtr(fmt.Sprintf("%v.jar", module.distStem()))
props.Dist.Dir = proptools.StringPtr(module.apiDistPath(apiScope))
props.Dist.Tag = proptools.StringPtr(".jar")
}
@@ -1377,7 +1396,7 @@ func (module *SdkLibrary) createStubsSourcesAndApi(mctx android.DefaultableHookC
// Dist the api txt artifact for sdk builds.
if !Bool(module.sdkLibraryProperties.No_dist) {
props.Dist.Targets = []string{"sdk", "win_sdk"}
- props.Dist.Dest = proptools.StringPtr(fmt.Sprintf("%v.txt", module.BaseModuleName()))
+ props.Dist.Dest = proptools.StringPtr(fmt.Sprintf("%v.txt", module.distStem()))
props.Dist.Dir = proptools.StringPtr(path.Join(module.apiDistPath(apiScope), "api"))
}