Make the default java_sdk_library dist_group "unknown"
Change the default dist_group from "android" to "unknown" to prevent accidentally including java_sdk_library stubs that do not set dist_group or owner in the public SDK. Bug: 186723288 Test: TestJavaSdkLibraryDist Change-Id: I9aae2a16254ac1a8d444acfa63bc571d1ef4b045
This commit is contained in:
parent
8e590ea854
commit
3dd662509d
2 changed files with 4 additions and 5 deletions
|
@ -458,7 +458,7 @@ type sdkLibraryProperties struct {
|
|||
Dist_stem *string
|
||||
|
||||
// The subdirectory for the artifacts that are copied to the dist directory. If not specified
|
||||
// then defaults to "android". Should be set to "android" for anything that should be published
|
||||
// then defaults to "unknown". Should be set to "android" for anything that should be published
|
||||
// in the public Android SDK.
|
||||
Dist_group *string
|
||||
|
||||
|
@ -1240,8 +1240,7 @@ func (module *SdkLibrary) distGroup() string {
|
|||
if owner := module.ModuleBase.Owner(); owner != "" {
|
||||
return owner
|
||||
}
|
||||
// TODO(b/186723288): Make this "unknown".
|
||||
return "android"
|
||||
return "unknown"
|
||||
}
|
||||
|
||||
func (module *SdkLibrary) latestApiFilegroupName(apiScope *apiScope) string {
|
||||
|
|
|
@ -888,7 +888,7 @@ func TestJavaSdkLibraryDist(t *testing.T) {
|
|||
testCases := []testCase{
|
||||
{
|
||||
module: "sdklib_no_owner",
|
||||
distDir: "apistubs/android/public",
|
||||
distDir: "apistubs/unknown/public",
|
||||
distStem: "sdklib_no_owner.jar",
|
||||
},
|
||||
{
|
||||
|
@ -903,7 +903,7 @@ func TestJavaSdkLibraryDist(t *testing.T) {
|
|||
},
|
||||
{
|
||||
module: "sdklib_stem_foo",
|
||||
distDir: "apistubs/android/public",
|
||||
distDir: "apistubs/unknown/public",
|
||||
distStem: "foo.jar",
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue