The android framework has android.annotation.RequiresApi, which is a copy of androidx.annotation.RequiresApi. However it was added with source retention instead of class retention like androidx's version has. This causes it to be missed if you compiled a library and then used that library to compile something else, that library's public methods won't have @RequiresApi on them when using that library's compiled jar file. To make @RequiresApi have class retention, we need to baseline the NewApi issues that it would cause. These baselines also require us to disable strict_updatability_linting in some places. Bug: 323366771 Test: m lint-check Change-Id: I0c984e3ba39e357ce102be442568f2d77a4f9034
58 lines
1.6 KiB
Text
58 lines
1.6 KiB
Text
//########################################################################
|
|
// Build NetworkStaticLibTests package
|
|
//########################################################################
|
|
|
|
package {
|
|
default_team: "trendy_team_fwk_core_networking",
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
android_library {
|
|
name: "NetworkStaticLibTestsLib",
|
|
srcs: [
|
|
"src/**/*.java",
|
|
"src/**/*.kt",
|
|
],
|
|
min_sdk_version: "30",
|
|
defaults: ["framework-connectivity-test-defaults"],
|
|
static_libs: [
|
|
"androidx.test.rules",
|
|
"mockito-target-extended-minus-junit4",
|
|
"netd-client",
|
|
"net-tests-utils",
|
|
"net-utils-framework-common",
|
|
"net-utils-device-common",
|
|
"net-utils-device-common-async",
|
|
"net-utils-device-common-bpf",
|
|
"net-utils-device-common-ip",
|
|
"net-utils-device-common-wear",
|
|
],
|
|
libs: [
|
|
"android.test.runner",
|
|
"android.test.base",
|
|
],
|
|
visibility: [
|
|
"//frameworks/base/packages/Tethering/tests/integration",
|
|
"//packages/modules/Connectivity/tests:__subpackages__",
|
|
"//packages/modules/Connectivity/Tethering/tests:__subpackages__",
|
|
"//packages/modules/NetworkStack/tests/integration",
|
|
],
|
|
lint: {
|
|
test: true,
|
|
},
|
|
}
|
|
|
|
android_test {
|
|
name: "NetworkStaticLibTests",
|
|
certificate: "platform",
|
|
static_libs: [
|
|
"NetworkStaticLibTestsLib",
|
|
],
|
|
jni_libs: [
|
|
// For mockito extended
|
|
"libdexmakerjvmtiagent",
|
|
"libstaticjvmtiagent",
|
|
],
|
|
jarjar_rules: "jarjar-rules.txt",
|
|
test_suites: ["device-tests"],
|
|
}
|