Remove unnecessary core library neverallow rules
am: ff5a177879
Change-Id: Iad4785586714383726fa89d659f4e2f8df0d9830
This commit is contained in:
@@ -97,32 +97,15 @@ func createLibcoreRules() []*rule {
|
||||
"external/wycheproof",
|
||||
}
|
||||
|
||||
var coreModules = []string{
|
||||
"core-all",
|
||||
"core-oj",
|
||||
"core-libart",
|
||||
"okhttp",
|
||||
"bouncycastle",
|
||||
"conscrypt",
|
||||
"apache-xml",
|
||||
}
|
||||
|
||||
// Core library constraints. Prevent targets adding dependencies on core
|
||||
// library internals, which could lead to compatibility issues with the ART
|
||||
// mainline module. They should use core.platform.api.stubs instead.
|
||||
// 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.
|
||||
rules := []*rule{
|
||||
neverallow().
|
||||
notIn(append(coreLibraryProjects, "development")...).
|
||||
with("no_standard_libs", "true"),
|
||||
}
|
||||
|
||||
for _, m := range coreModules {
|
||||
r := neverallow().
|
||||
notIn(coreLibraryProjects...).
|
||||
with("libs", m).
|
||||
because("Only core libraries projects can depend on " + m)
|
||||
rules = append(rules, r)
|
||||
}
|
||||
return rules
|
||||
}
|
||||
|
||||
|
@@ -137,17 +137,6 @@ var neverallowTests = []struct {
|
||||
},
|
||||
expectedError: "",
|
||||
},
|
||||
{
|
||||
name: "dependency on core-libart",
|
||||
fs: map[string][]byte{
|
||||
"Blueprints": []byte(`
|
||||
java_library {
|
||||
name: "needs_core_libart",
|
||||
libs: ["core-libart"],
|
||||
}`),
|
||||
},
|
||||
expectedError: "Only core libraries projects can depend on core-libart",
|
||||
},
|
||||
{
|
||||
name: "java_device_for_host",
|
||||
fs: map[string][]byte{
|
||||
|
Reference in New Issue
Block a user