Merge changes I42cb181f,I6413c9b1 am: 33ee25466f

am: 00c2bbb0e7

Change-Id: Icca90608b256e726a9a1bd79e9cedca1a6b53f84
This commit is contained in:
Paul Duffin
2019-06-17 15:25:30 -07:00
committed by android-build-merger
12 changed files with 198 additions and 131 deletions

View File

@@ -53,7 +53,6 @@ func createNeverAllows() []*rule {
rules = append(rules, createLibcoreRules()...)
rules = append(rules, createMediaRules()...)
rules = append(rules, createJavaDeviceForHostRules()...)
rules = append(rules, createJavaLibraryHostRules()...)
return rules
}
@@ -102,13 +101,9 @@ func createLibcoreRules() []*rule {
"development",
}
// Core library constraints. The no_standard_libs can only be used in core
// library projects. Access to core library targets is restricted using
// visibility rules.
// Core library constraints. The sdk_version: "none" can only be used in core library projects.
// Access to core library targets is restricted using visibility rules.
rules := []*rule{
neverallow().
notIn(coreLibraryProjects...).
with("no_standard_libs", "true"),
neverallow().
notIn(coreLibraryProjects...).
with("sdk_version", "none"),
@@ -140,15 +135,6 @@ func createJavaDeviceForHostRules() []*rule {
}
}
func createJavaLibraryHostRules() []*rule {
return []*rule{
neverallow().
moduleType("java_library_host").
with("no_standard_libs", "true").
because("no_standard_libs makes no sense with java_library_host"),
}
}
func neverallowMutator(ctx BottomUpMutatorContext) {
m, ok := ctx.Module().(Module)
if !ok {