Loading java/app.go +2 −2 Original line number Diff line number Diff line Loading @@ -1064,7 +1064,7 @@ func AndroidTestFactory() android.Module { module.appProperties.Use_embedded_native_libs = proptools.BoolPtr(true) module.appProperties.AlwaysPackageNativeLibs = true module.Module.dexpreopter.isTest = true module.Module.linter.test = true module.Module.linter.properties.Lint.Test = proptools.BoolPtr(true) module.addHostAndDeviceProperties() module.AddProperties( Loading Loading @@ -1117,7 +1117,7 @@ func AndroidTestHelperAppFactory() android.Module { module.appProperties.Use_embedded_native_libs = proptools.BoolPtr(true) module.appProperties.AlwaysPackageNativeLibs = true module.Module.dexpreopter.isTest = true module.Module.linter.test = true module.Module.linter.properties.Lint.Test = proptools.BoolPtr(true) module.addHostAndDeviceProperties() module.AddProperties( Loading java/java.go +2 −2 Original line number Diff line number Diff line Loading @@ -1262,7 +1262,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) Loading @@ -1278,7 +1278,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 Loading java/lint.go +6 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,11 @@ type LintProperties struct { // If true, baselining updatability lint checks (e.g. NewApi) is prohibited. Defaults to false. Strict_updatability_linting *bool // Treat the code in this module as test code for @VisibleForTesting enforcement. // This will be true by default for test module types, false otherwise. // If soong gets support for testonly, this flag should be replaced with that. Test *bool } } Loading @@ -74,7 +79,6 @@ type linter struct { classpath android.Paths classes android.Path extraLintCheckJars android.Paths test bool library bool minSdkVersion int targetSdkVersion int Loading Loading @@ -229,7 +233,7 @@ func (l *linter) writeLintProjectXML(ctx android.ModuleContext, rule *android.Ru if l.library { cmd.Flag("--library") } if l.test { if proptools.BoolDefault(l.properties.Lint.Test, false) { cmd.Flag("--test") } if l.manifest != nil { Loading java/robolectric.go +2 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import ( "android/soong/android" "android/soong/java/config" "android/soong/tradefed" "github.com/google/blueprint/proptools" ) func init() { Loading Loading @@ -344,7 +345,7 @@ func RobolectricTestFactory() android.Module { &module.testProperties) module.Module.dexpreopter.isTest = true module.Module.linter.test = true module.Module.linter.properties.Lint.Test = proptools.BoolPtr(true) module.testProperties.Test_suites = []string{"robolectric-tests"} Loading Loading
java/app.go +2 −2 Original line number Diff line number Diff line Loading @@ -1064,7 +1064,7 @@ func AndroidTestFactory() android.Module { module.appProperties.Use_embedded_native_libs = proptools.BoolPtr(true) module.appProperties.AlwaysPackageNativeLibs = true module.Module.dexpreopter.isTest = true module.Module.linter.test = true module.Module.linter.properties.Lint.Test = proptools.BoolPtr(true) module.addHostAndDeviceProperties() module.AddProperties( Loading Loading @@ -1117,7 +1117,7 @@ func AndroidTestHelperAppFactory() android.Module { module.appProperties.Use_embedded_native_libs = proptools.BoolPtr(true) module.appProperties.AlwaysPackageNativeLibs = true module.Module.dexpreopter.isTest = true module.Module.linter.test = true module.Module.linter.properties.Lint.Test = proptools.BoolPtr(true) module.addHostAndDeviceProperties() module.AddProperties( Loading
java/java.go +2 −2 Original line number Diff line number Diff line Loading @@ -1262,7 +1262,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) Loading @@ -1278,7 +1278,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 Loading
java/lint.go +6 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,11 @@ type LintProperties struct { // If true, baselining updatability lint checks (e.g. NewApi) is prohibited. Defaults to false. Strict_updatability_linting *bool // Treat the code in this module as test code for @VisibleForTesting enforcement. // This will be true by default for test module types, false otherwise. // If soong gets support for testonly, this flag should be replaced with that. Test *bool } } Loading @@ -74,7 +79,6 @@ type linter struct { classpath android.Paths classes android.Path extraLintCheckJars android.Paths test bool library bool minSdkVersion int targetSdkVersion int Loading Loading @@ -229,7 +233,7 @@ func (l *linter) writeLintProjectXML(ctx android.ModuleContext, rule *android.Ru if l.library { cmd.Flag("--library") } if l.test { if proptools.BoolDefault(l.properties.Lint.Test, false) { cmd.Flag("--test") } if l.manifest != nil { Loading
java/robolectric.go +2 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import ( "android/soong/android" "android/soong/java/config" "android/soong/tradefed" "github.com/google/blueprint/proptools" ) func init() { Loading Loading @@ -344,7 +345,7 @@ func RobolectricTestFactory() android.Module { &module.testProperties) module.Module.dexpreopter.isTest = true module.Module.linter.test = true module.Module.linter.properties.Lint.Test = proptools.BoolPtr(true) module.testProperties.Test_suites = []string{"robolectric-tests"} Loading