Add lint test property
Some libraries are only used for tests, but
are not test module types. These modules get warnings
about @VisibleForTesting usages when they really
shouldn't. Expose a test flag that module authors
can use to make lint treat a module as test code.
Bug: 235339747
Test: Manually tested applying it to SystemUI-tests
Change-Id: I1356749a669dc80a7725605d7159da27c9a211b4
(cherry picked from commit d57e8b2c2a
)
Merged-In: I1356749a669dc80a7725605d7159da27c9a211b4
This commit is contained in:
committed by
Chidera Olibie
parent
fd1f4d5b9e
commit
2bb9c554b1
@@ -1251,7 +1251,7 @@ func TestFactory() android.Module {
|
||||
|
||||
module.Module.properties.Installable = proptools.BoolPtr(true)
|
||||
module.Module.dexpreopter.isTest = true
|
||||
module.Module.linter.test = true
|
||||
module.Module.linter.properties.Lint.Test = proptools.BoolPtr(true)
|
||||
|
||||
android.InitSdkAwareModule(module)
|
||||
InitJavaModule(module, android.HostAndDeviceSupported)
|
||||
@@ -1267,7 +1267,7 @@ func TestHelperLibraryFactory() android.Module {
|
||||
|
||||
module.Module.properties.Installable = proptools.BoolPtr(true)
|
||||
module.Module.dexpreopter.isTest = true
|
||||
module.Module.linter.test = true
|
||||
module.Module.linter.properties.Lint.Test = proptools.BoolPtr(true)
|
||||
|
||||
InitJavaModule(module, android.HostAndDeviceSupported)
|
||||
return module
|
||||
|
Reference in New Issue
Block a user