Merge "Allow java_library.exclude_static_libs property for libcore and f/b/api"
This commit is contained in:
@@ -258,10 +258,10 @@ func createProhibitFrameworkAccessRules() []Rule {
|
|||||||
|
|
||||||
func createJavaExcludeStaticLibsRule() Rule {
|
func createJavaExcludeStaticLibsRule() Rule {
|
||||||
return NeverAllow().
|
return NeverAllow().
|
||||||
NotIn("build/soong").
|
NotIn("build/soong", "libcore", "frameworks/base/api").
|
||||||
ModuleType("java_library").
|
ModuleType("java_library").
|
||||||
WithMatcher("exclude_static_libs", isSetMatcherInstance).
|
WithMatcher("exclude_static_libs", isSetMatcherInstance).
|
||||||
Because("exclude_static_libs property is only allowed for java modules defined in build/soong")
|
Because("exclude_static_libs property is only allowed for java modules defined in build/soong, libcore, and frameworks/base/api")
|
||||||
}
|
}
|
||||||
|
|
||||||
func neverallowMutator(ctx BottomUpMutatorContext) {
|
func neverallowMutator(ctx BottomUpMutatorContext) {
|
||||||
|
@@ -358,7 +358,7 @@ var neverallowTests = []struct {
|
|||||||
`),
|
`),
|
||||||
},
|
},
|
||||||
expectedErrors: []string{
|
expectedErrors: []string{
|
||||||
`exclude_static_libs property is only allowed for java modules defined in build/soong`,
|
`exclude_static_libs property is only allowed for java modules defined in build/soong, libcore, and frameworks/base/api`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user