Merge "Change default to require licenses property." am: 7bb0238418

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1818661

Change-Id: Ie6e749f3f9acd03c287b845c4e54a326383240b4
This commit is contained in:
Treehugger Robot
2021-09-13 19:39:03 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 2 deletions

View File

@@ -845,7 +845,7 @@ func translateAndroidModule(ctx SingletonContext, w io.Writer, mod blueprint.Mod
case "*selinux.selinuxContextsModule": // license properties written
case "*sysprop.syspropLibrary": // license properties written
default:
if ctx.Config().IsEnvTrue("ANDROID_REQUIRE_LICENSES") {
if !ctx.Config().IsEnvFalse("ANDROID_REQUIRE_LICENSES") {
return fmt.Errorf("custom make rules not allowed for %q (%q) module %q", ctx.ModuleType(mod), reflect.TypeOf(mod), ctx.ModuleName(mod))
}
}

View File

@@ -253,7 +253,7 @@ func getLicenses(ctx BaseModuleContext, module Module) []string {
primaryProperty := module.base().primaryLicensesProperty
if primaryProperty == nil {
if ctx.Config().IsEnvTrue("ANDROID_REQUIRE_LICENSES") {
if !ctx.Config().IsEnvFalse("ANDROID_REQUIRE_LICENSES") {
ctx.ModuleErrorf("module type %q must have an applicable licenses property", ctx.OtherModuleType(module))
}
return nil