Bob Badour | 3695668 | 2021-02-23 14:05:02 -0800 | [diff] [blame] | 1 | package { |
Bob Badour | 0b623c6 | 2022-01-19 20:55:16 -0800 | [diff] [blame] | 2 | // See: http://go/android-license-faq |
| 3 | default_applicable_licenses: ["Android-Apache-2.0"], |
Bob Badour | 3695668 | 2021-02-23 14:05:02 -0800 | [diff] [blame] | 4 | } |
| 5 | |
Colin Cross | 9db703b | 2018-08-10 14:11:59 -0700 | [diff] [blame] | 6 | java_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 | |
| 35 | java_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 | } |
Dan Willemsen | 168903e | 2019-01-15 14:29:19 -0800 | [diff] [blame] | 57 | |
| 58 | // Used with an android_test / android_test_helper_app, this is equivalent to |
| 59 | // BUILD_CTS_SUPPORT_PACKAGE |
| 60 | java_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 |
| 75 | java_defaults { |
| 76 | name: "cts_defaults", |
| 77 | defaults: ["cts_support_defaults"], |
| 78 | target: { |
| 79 | android: { |
| 80 | static_libs: ["platform-test-annotations"], |
| 81 | }, |
| 82 | }, |
| 83 | } |
Hai Zhang | 65056c2 | 2021-04-26 19:55:09 -0700 | [diff] [blame] | 84 | |
| 85 | java_defaults { |
| 86 | name: "mts-target-sdk-version-current", |
| 87 | target_sdk_version: "10000", |
| 88 | } |