Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3dd66250 authored by Colin Cross's avatar Colin Cross
Browse files

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
parent 8e590ea8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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 {
+2 −2
Original line number Diff line number Diff line
@@ -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",
		},
		{