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

Commit 6b200500 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix checking of empty slice properties"

parents 53c88448 6e93ac9a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -668,11 +668,11 @@ func SdkLibraryMutator(mctx android.TopDownMutatorContext) {
}

func (module *SdkLibrary) createInternalModules(mctx android.TopDownMutatorContext) {
	if module.Library.Module.properties.Srcs == nil {
	if len(module.Library.Module.properties.Srcs) == 0 {
		mctx.PropertyErrorf("srcs", "java_sdk_library must specify srcs")
	}

	if module.sdkLibraryProperties.Api_packages == nil {
	if len(module.sdkLibraryProperties.Api_packages) == 0 {
		mctx.PropertyErrorf("api_packages", "java_sdk_library must specify api_packages")
	}

+5 −1
Original line number Diff line number Diff line
@@ -82,7 +82,11 @@ func syspropLibraryFactory() android.Module {
}

func syspropLibraryHook(ctx android.LoadHookContext, m *syspropLibrary) {
	if m.syspropLibraryProperties.Api_packages == nil {
	if len(m.commonProperties.Srcs) == 0 {
		ctx.PropertyErrorf("srcs", "sysprop_library must specify srcs")
	}

	if len(m.syspropLibraryProperties.Api_packages) == 0 {
		ctx.PropertyErrorf("api_packages", "sysprop_library must specify api_packages")
	}