Enable api lint and check_last_api for modules
This adds checking of module api compatibility to the individual module api rules. Until now, this checking has been done via the monolithic metalava runs which we are aiming to get rid of. Now is a good time to do this because we can compare them to the just finalized version 30 API, which we have no diffs with. Baseline the existing wifi failures that metalava fails to find in the previous API. Bug: 144149403 Test: m checkapi Change-Id: Id222895daa3a769c265965b052a17d5a1ca18462
This commit is contained in:
@@ -74,6 +74,9 @@ stubs_defaults {
|
||||
api_file: "api/current.txt",
|
||||
removed_api_file: "api/removed.txt",
|
||||
},
|
||||
api_lint: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
dist: {
|
||||
targets: ["sdk", "win_sdk"],
|
||||
@@ -93,6 +96,9 @@ stubs_defaults {
|
||||
api_file: "api/system-current.txt",
|
||||
removed_api_file: "api/system-removed.txt",
|
||||
},
|
||||
api_lint: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
dist: {
|
||||
targets: ["sdk", "win_sdk"],
|
||||
@@ -147,6 +153,9 @@ stubs_defaults {
|
||||
api_file: "api/module-lib-current.txt",
|
||||
removed_api_file: "api/module-lib-removed.txt",
|
||||
},
|
||||
api_lint: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
dist: {
|
||||
targets: ["sdk", "win_sdk"],
|
||||
@@ -173,6 +182,9 @@ stubs_defaults {
|
||||
api_file: "api/current.txt",
|
||||
removed_api_file: "api/removed.txt",
|
||||
},
|
||||
api_lint: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
dist: {
|
||||
targets: ["sdk", "win_sdk"],
|
||||
|
||||
@@ -102,6 +102,15 @@ droidstubs {
|
||||
"framework-media-stubs-srcs-defaults",
|
||||
"framework-module-stubs-defaults-publicapi",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-media.api.public.latest",
|
||||
removed_api_file: ":framework-media-removed.api.public.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-media.api.public.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -110,6 +119,15 @@ droidstubs {
|
||||
"framework-media-stubs-srcs-defaults",
|
||||
"framework-module-stubs-defaults-systemapi",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-media.api.system.latest",
|
||||
removed_api_file: ":framework-media-removed.api.system.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-media.api.system.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -118,6 +136,15 @@ droidstubs {
|
||||
"framework-media-stubs-srcs-defaults",
|
||||
"framework-module-api-defaults-module_libs_api",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-media.api.module-lib.latest",
|
||||
removed_api_file: ":framework-media-removed.api.module-lib.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-media.api.module-lib.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
|
||||
@@ -55,6 +55,15 @@ droidstubs {
|
||||
"framework-module-stubs-defaults-publicapi",
|
||||
"framework-permission-stubs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-permission.api.public.latest",
|
||||
removed_api_file: ":framework-permission-removed.api.public.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-permission.api.public.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -63,6 +72,15 @@ droidstubs {
|
||||
"framework-module-stubs-defaults-systemapi",
|
||||
"framework-permission-stubs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-permission.api.system.latest",
|
||||
removed_api_file: ":framework-permission-removed.api.system.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-permission.api.system.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -71,6 +89,15 @@ droidstubs {
|
||||
"framework-module-api-defaults-module_libs_api",
|
||||
"framework-permission-stubs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-permission.api.module-lib.latest",
|
||||
removed_api_file: ":framework-permission-removed.api.module-lib.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-permission.api.module-lib.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
|
||||
@@ -41,6 +41,15 @@ droidstubs {
|
||||
name: "service-permission-stubs-srcs",
|
||||
srcs: [ ":service-permission-sources" ],
|
||||
defaults: ["service-module-stubs-srcs-defaults"],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":service-permission.api.system-server.latest",
|
||||
removed_api_file: ":service-permission-removed.api.system-server.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":service-permission.api.system-server.latest",
|
||||
},
|
||||
},
|
||||
visibility: ["//visibility:private"],
|
||||
dist: { dest: "service-permission.txt" },
|
||||
}
|
||||
|
||||
@@ -57,6 +57,15 @@ droidstubs {
|
||||
"framework-module-stubs-defaults-publicapi",
|
||||
"framework-sdkextensions-stubs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-sdkextensions.api.public.latest",
|
||||
removed_api_file: ":framework-sdkextensions-removed.api.public.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-sdkextensions.api.public.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -65,6 +74,15 @@ droidstubs {
|
||||
"framework-module-stubs-defaults-systemapi",
|
||||
"framework-sdkextensions-stubs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-sdkextensions.api.system.latest",
|
||||
removed_api_file: ":framework-sdkextensions-removed.api.system.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-sdkextensions.api.system.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -73,6 +91,15 @@ droidstubs {
|
||||
"framework-module-api-defaults-module_libs_api",
|
||||
"framework-sdkextensions-stubs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-sdkextensions.api.module-lib.latest",
|
||||
removed_api_file: ":framework-sdkextensions-removed.api.module-lib.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-sdkextensions.api.module-lib.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
|
||||
@@ -93,6 +93,15 @@ droidstubs {
|
||||
"framework-module-stubs-defaults-publicapi",
|
||||
"framework-statsd-stubs-srcs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-statsd.api.public.latest",
|
||||
removed_api_file: ":framework-statsd-removed.api.public.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-statsd.api.public.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -101,6 +110,15 @@ droidstubs {
|
||||
"framework-module-stubs-defaults-systemapi",
|
||||
"framework-statsd-stubs-srcs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-statsd.api.system.latest",
|
||||
removed_api_file: ":framework-statsd-removed.api.system.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-statsd.api.system.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -109,6 +127,15 @@ droidstubs {
|
||||
"framework-module-api-defaults-module_libs_api",
|
||||
"framework-statsd-stubs-srcs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-statsd.api.module-lib.latest",
|
||||
removed_api_file: ":framework-statsd-removed.api.module-lib.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-statsd.api.module-lib.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
|
||||
@@ -94,6 +94,15 @@ droidstubs {
|
||||
"framework-module-stubs-defaults-publicapi",
|
||||
"framework-tethering-stubs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-tethering.api.public.latest",
|
||||
removed_api_file: ":framework-tethering-removed.api.public.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-tethering.api.public.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -102,6 +111,15 @@ droidstubs {
|
||||
"framework-module-stubs-defaults-systemapi",
|
||||
"framework-tethering-stubs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-tethering.api.system.latest",
|
||||
removed_api_file: ":framework-tethering-removed.api.system.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-tethering.api.system.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -110,6 +128,15 @@ droidstubs {
|
||||
"framework-module-api-defaults-module_libs_api",
|
||||
"framework-tethering-stubs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-tethering.api.module-lib.latest",
|
||||
removed_api_file: ":framework-tethering-removed.api.module-lib.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-tethering.api.module-lib.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
|
||||
@@ -143,6 +143,16 @@ droidstubs {
|
||||
"framework-module-stubs-defaults-publicapi",
|
||||
"framework-wifi-stubs-srcs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-wifi.api.public.latest",
|
||||
removed_api_file: ":framework-wifi-removed.api.public.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-wifi.api.public.latest",
|
||||
baseline_file: "api/lint-baseline.txt",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -151,6 +161,16 @@ droidstubs {
|
||||
"framework-module-stubs-defaults-systemapi",
|
||||
"framework-wifi-stubs-srcs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-wifi.api.system.latest",
|
||||
removed_api_file: ":framework-wifi-removed.api.system.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-wifi.api.system.latest",
|
||||
baseline_file: "api/system-lint-baseline.txt",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
@@ -159,6 +179,15 @@ droidstubs {
|
||||
"framework-module-api-defaults-module_libs_api",
|
||||
"framework-wifi-stubs-srcs-defaults",
|
||||
],
|
||||
check_api: {
|
||||
last_released: {
|
||||
api_file: ":framework-wifi.api.module-lib.latest",
|
||||
removed_api_file: ":framework-wifi-removed.api.module-lib.latest",
|
||||
},
|
||||
api_lint: {
|
||||
new_since: ":framework-wifi.api.module-lib.latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
|
||||
13
wifi/api/lint-baseline.txt
Normal file
13
wifi/api/lint-baseline.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
// Baseline format: 1.0
|
||||
GenericException: android.net.wifi.WifiManager.LocalOnlyHotspotReservation#finalize():
|
||||
Methods must not throw generic exceptions (`java.lang.Throwable`)
|
||||
GenericException: android.net.wifi.WifiManager.MulticastLock#finalize():
|
||||
Methods must not throw generic exceptions (`java.lang.Throwable`)
|
||||
GenericException: android.net.wifi.WifiManager.WifiLock#finalize():
|
||||
Methods must not throw generic exceptions (`java.lang.Throwable`)
|
||||
|
||||
|
||||
VisiblySynchronized: PsiThisExpression:WifiManager.this:
|
||||
Internal locks must not be exposed (synchronizing on this or class is still externally observable): method android.net.wifi.WifiManager.WifiLock.finalize()
|
||||
VisiblySynchronized: android.net.wifi.WifiManager.WifiLock#finalize():
|
||||
Internal locks must not be exposed (synchronizing on this or class is still externally observable): method android.net.wifi.WifiManager.WifiLock.finalize()
|
||||
6
wifi/api/system-lint-baseline.txt
Normal file
6
wifi/api/system-lint-baseline.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
// Baseline format: 1.0
|
||||
MissingGetterMatchingBuilder: android.net.wifi.rtt.RangingRequest.Builder#addResponder(android.net.wifi.rtt.ResponderConfig):
|
||||
android.net.wifi.rtt.RangingRequest does not declare a `getResponders()` method matching method android.net.wifi.rtt.RangingRequest.Builder.addResponder(android.net.wifi.rtt.ResponderConfig)
|
||||
|
||||
MissingNullability: android.net.wifi.rtt.RangingRequest.Builder#addResponder(android.net.wifi.rtt.ResponderConfig):
|
||||
|
||||
Reference in New Issue
Block a user