1package { 2 // See: http://go/android-license-faq 3 default_applicable_licenses: ["Android-Apache-2.0"], 4} 5 6java_defaults { 7 name: "cts_error_prone_rules", 8 errorprone: { 9 javacflags: [ 10 // Set of error prone rules to ensure code quality 11 // When updating this list, also update error_prone_rules.mk 12 "-Xep:ArrayToString:ERROR", 13 "-Xep:BoxedPrimitiveConstructor:ERROR", 14 "-Xep:ConstantField:ERROR", 15 "-Xep:EqualsIncompatibleType:ERROR", 16 "-Xep:FormatString:ERROR", 17 "-Xep:GetClassOnClass:ERROR", 18 "-Xep:IdentityBinaryExpression:ERROR", 19 "-Xep:JUnit3TestNotRun:ERROR", 20 "-Xep:JUnit4ClassUsedInJUnit3:ERROR", 21 "-Xep:JUnitAmbiguousTestClass:ERROR", 22 "-Xep:MissingFail:ERROR", 23 "-Xep:MissingOverride:ERROR", 24 "-Xep:Overrides:ERROR", 25 "-Xep:ReferenceEquality:ERROR", 26 "-Xep:RemoveUnusedImports:ERROR", 27 "-Xep:ReturnValueIgnored:ERROR", 28 "-Xep:SelfEquals:ERROR", 29 "-Xep:SizeGreaterThanOrEqualsZero:ERROR", 30 "-Xep:TryFailThrowable:ERROR", 31 ], 32 }, 33} 34 35java_defaults { 36 name: "cts_error_prone_rules_tests", 37 errorprone: { 38 javacflags: [ 39 // Set of error prone rules to ensure code quality of tests 40 // Goal is to eventually merge with cts_error_prone_rules 41 // When updating this list, also update error_prone_rules_tests.mk 42 "-Xep:ArrayToString:ERROR", 43 "-Xep:CollectionIncompatibleType:ERROR", 44 "-Xep:EqualsIncompatibleType:ERROR", 45 "-Xep:EqualsNaN:ERROR", 46 "-Xep:FormatString:ERROR", 47 "-Xep:IdentityBinaryExpression:ERROR", 48 "-Xep:JUnit3TestNotRun:ERROR", 49 "-Xep:JUnit4ClassUsedInJUnit3:ERROR", 50 "-Xep:JUnitAmbiguousTestClass:ERROR", 51 "-Xep:MissingFail:ERROR", 52 "-Xep:SizeGreaterThanOrEqualsZero:ERROR", 53 "-Xep:TryFailThrowable:ERROR", 54 ], 55 }, 56} 57 58// Used with an android_test / android_test_helper_app, this is equivalent to 59// BUILD_CTS_SUPPORT_PACKAGE 60java_defaults { 61 name: "cts_support_defaults", 62 defaults: ["cts_error_prone_rules_tests"], 63 dex_preopt: { 64 enabled: false, 65 }, 66 optimize: { 67 enabled: false, 68 }, 69} 70 71// Used with different module types, this is equivalent to: 72// android_test: BUILD_CTS_PACKAGE 73// java_library: BUILD_CTS_TARGET_JAVA_LIBRARY 74// java_library_host: BUILD_CTS_HOST_JAVA_LIBRARY 75java_defaults { 76 name: "cts_defaults", 77 defaults: ["cts_support_defaults"], 78 target: { 79 android: { 80 static_libs: ["platform-test-annotations"], 81 }, 82 }, 83} 84 85java_defaults { 86 name: "mts-target-sdk-version-current", 87 target_sdk_version: "10000", 88} 89