blob: 0d5087898e586427f162fea0da0655a685f462c9 [file] [log] [blame]
package {
default_applicable_licenses: ["cts_license"],
}
// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
// See: http://go/android-license-faq
license {
name: "cts_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-CC-BY",
"SPDX-license-identifier-MIT",
"SPDX-license-identifier-NCSA",
"legacy_unencumbered",
],
// large-scale-change unable to identify any license_text files
}
java_defaults {
name: "cts_error_prone_rules",
errorprone: {
javacflags: [
// Set of error prone rules to ensure code quality
// When updating this list, also update error_prone_rules.mk
"-Xep:ArrayToString:ERROR",
"-Xep:BoxedPrimitiveConstructor:ERROR",
"-Xep:ConstantField:ERROR",
"-Xep:EqualsIncompatibleType:ERROR",
"-Xep:FormatString:ERROR",
"-Xep:GetClassOnClass:ERROR",
"-Xep:IdentityBinaryExpression:ERROR",
"-Xep:JUnit3TestNotRun:ERROR",
"-Xep:JUnit4ClassUsedInJUnit3:ERROR",
"-Xep:JUnitAmbiguousTestClass:ERROR",
"-Xep:MissingFail:ERROR",
"-Xep:MissingOverride:ERROR",
"-Xep:Overrides:ERROR",
"-Xep:ReferenceEquality:ERROR",
"-Xep:RemoveUnusedImports:ERROR",
"-Xep:ReturnValueIgnored:ERROR",
"-Xep:SelfEquals:ERROR",
"-Xep:SizeGreaterThanOrEqualsZero:ERROR",
"-Xep:TryFailThrowable:ERROR",
],
},
}
java_defaults {
name: "cts_error_prone_rules_tests",
errorprone: {
javacflags: [
// Set of error prone rules to ensure code quality of tests
// Goal is to eventually merge with cts_error_prone_rules
// When updating this list, also update error_prone_rules_tests.mk
"-Xep:ArrayToString:ERROR",
"-Xep:CollectionIncompatibleType:ERROR",
"-Xep:EqualsIncompatibleType:ERROR",
"-Xep:EqualsNaN:ERROR",
"-Xep:FormatString:ERROR",
"-Xep:IdentityBinaryExpression:ERROR",
"-Xep:JUnit3TestNotRun:ERROR",
"-Xep:JUnit4ClassUsedInJUnit3:ERROR",
"-Xep:JUnitAmbiguousTestClass:ERROR",
"-Xep:MissingFail:ERROR",
"-Xep:SizeGreaterThanOrEqualsZero:ERROR",
"-Xep:TryFailThrowable:ERROR",
],
},
}
// Used with an android_test / android_test_helper_app, this is equivalent to
// BUILD_CTS_SUPPORT_PACKAGE
java_defaults {
name: "cts_support_defaults",
defaults: ["cts_error_prone_rules_tests"],
dex_preopt: {
enabled: false,
},
optimize: {
enabled: false,
},
}
// Used with different module types, this is equivalent to:
// android_test: BUILD_CTS_PACKAGE
// java_library: BUILD_CTS_TARGET_JAVA_LIBRARY
// java_library_host: BUILD_CTS_HOST_JAVA_LIBRARY
java_defaults {
name: "cts_defaults",
defaults: ["cts_support_defaults"],
target: {
android: {
static_libs: ["platform-test-annotations"],
},
},
}
java_defaults {
name: "mts-target-sdk-version-current",
target_sdk_version: "10000",
}