Dedup stub jar build rules
Move shared attrs into defaults.
Bug: 146757305
Test: m
Change-Id: I90292cafaac1dcc64d642db072ce4880fcdb87cb
diff --git a/StubLibraries.bp b/StubLibraries.bp
index 9b9311f..50d23ad2 100644
--- a/StubLibraries.bp
+++ b/StubLibraries.bp
@@ -232,6 +232,9 @@
java_defaults {
name: "framework-stubs-default",
+ libs: [ "stub-annotations" ],
+ static_libs: [ "private-stub-annotations-jar" ],
+ sdk_version: "core_current",
errorprone: {
javacflags: [
"-XepDisableAllChecks",
@@ -247,62 +250,26 @@
java_library_static {
name: "android_stubs_current",
- srcs: [
- ":api-stubs-docs",
- ],
- libs: [
- "stub-annotations",
- ],
- static_libs: [
- "private-stub-annotations-jar",
- ],
+ srcs: [ ":api-stubs-docs" ],
defaults: ["framework-stubs-default"],
- sdk_version: "core_current",
}
java_library_static {
name: "android_system_stubs_current",
- srcs: [
- ":system-api-stubs-docs",
- ],
- libs: [
- "stub-annotations",
- ],
- static_libs: [
- "private-stub-annotations-jar",
- ],
+ srcs: [ ":system-api-stubs-docs" ],
defaults: ["framework-stubs-default"],
- sdk_version: "core_current",
}
java_library_static {
name: "android_test_stubs_current",
- srcs: [
- ":test-api-stubs-docs",
- ],
- libs: [
- "stub-annotations",
- ],
- static_libs: [
- "private-stub-annotations-jar",
- ],
+ srcs: [ ":test-api-stubs-docs" ],
defaults: ["framework-stubs-default"],
- sdk_version: "core_current",
}
java_library_static {
name: "android_module_lib_stubs_current",
- srcs: [
- ":module-lib-api-stubs-docs",
- ],
- libs: [
- "stub-annotations",
- ],
- static_libs: [
- "private-stub-annotations-jar",
- ],
+ srcs: [ ":module-lib-api-stubs-docs" ],
defaults: ["framework-stubs-default"],
- sdk_version: "core_current",
}
/////////////////////////////////////////////////////////////////////