diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/Android.bp | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/api/Android.bp b/api/Android.bp index 5b733883063a..db1f64c57e2c 100644 --- a/api/Android.bp +++ b/api/Android.bp @@ -24,12 +24,17 @@ package { default_applicable_licenses: ["frameworks_base_license"], } +metalava_cmd = "$(location metalava)" +// Silence reflection warnings. See b/168689341 +metalava_cmd += " -J--add-opens=java.base/java.util=ALL-UNNAMED " +metalava_cmd += " --no-banner --format=v2 " + genrule { name: "current-api-xml", tools: ["metalava"], srcs: [":frameworks-base-api-current.txt"], out: ["current.api"], - cmd: "$(location metalava) --no-banner -convert2xmlnostrip $(in) $(out)", + cmd: metalava_cmd + "-convert2xmlnostrip $(in) $(out)", visibility: ["//visibility:public"], } @@ -56,7 +61,7 @@ genrule { ], out: ["current.txt"], tools: ["metalava"], - cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", + cmd: metalava_cmd + "$(in) --api $(out)", dists: [ { targets: ["droidcore"], @@ -81,7 +86,7 @@ genrule { ], out: ["stdout.txt"], tools: ["metalava"], - cmd: "$(location metalava) --no-banner --format=v2 " + + cmd: metalava_cmd + "--check-compatibility:api:released $(location :android.api.public.latest) " + "--baseline:compatibility:released $(location :android-incompatibilities.api.public.latest) " + "$(location :frameworks-base-api-current.txt) " + @@ -138,7 +143,7 @@ genrule { ], out: ["removed.txt"], tools: ["metalava"], - cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", + cmd: metalava_cmd + "$(in) --api $(out)", dists: [ { targets: ["droidcore"], @@ -156,6 +161,7 @@ genrule { genrule { name: "frameworks-base-api-system-current.txt", srcs: [ + ":art.module.public.api{.system.api.txt}", ":android.net.ipsec.ike{.system.api.txt}", ":framework-appsearch{.system.api.txt}", ":framework-connectivity{.system.api.txt}", @@ -173,7 +179,7 @@ genrule { ], out: ["system-current.txt"], tools: ["metalava"], - cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", + cmd: metalava_cmd + "$(in) --api $(out)", dists: [ { targets: ["droidcore"], @@ -199,7 +205,7 @@ genrule { ], out: ["stdout.txt"], tools: ["metalava"], - cmd: "$(location metalava) --no-banner --format=v2 " + + cmd: metalava_cmd + "--check-compatibility:api:released $(location :android.api.system.latest) " + "--check-compatibility:base $(location :frameworks-base-api-current.txt) " + "--baseline:compatibility:released $(location :android-incompatibilities.api.system.latest) " + @@ -210,6 +216,7 @@ genrule { genrule { name: "frameworks-base-api-system-removed.txt", srcs: [ + ":art.module.public.api{.system.removed-api.txt}", ":android.net.ipsec.ike{.system.removed-api.txt}", ":framework-appsearch{.system.removed-api.txt}", ":framework-connectivity{.system.removed-api.txt}", @@ -227,7 +234,7 @@ genrule { ], out: ["system-removed.txt"], tools: ["metalava"], - cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", + cmd: metalava_cmd + "$(in) --api $(out)", dists: [ { targets: ["droidcore"], @@ -246,6 +253,7 @@ genrule { genrule { name: "frameworks-base-api-module-lib-current.txt", srcs: [ + ":art.module.public.api{.module-lib.api.txt}", ":android.net.ipsec.ike{.module-lib.api.txt}", ":framework-appsearch{.module-lib.api.txt}", ":framework-connectivity{.module-lib.api.txt}", @@ -263,7 +271,7 @@ genrule { ], out: ["module-lib-current.txt"], tools: ["metalava"], - cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", + cmd: metalava_cmd + "$(in) --api $(out)", dists: [ { targets: ["droidcore"], @@ -288,7 +296,7 @@ genrule { ], out: ["stdout.txt"], tools: ["metalava"], - cmd: "$(location metalava) --no-banner --format=v2 " + + cmd: metalava_cmd + "--check-compatibility:api:released $(location :android.api.module-lib.latest) " + // Note: having "public" be the base of module-lib is not perfect -- it should // ideally be a merged public+system), but this will help when migrating from @@ -302,6 +310,7 @@ genrule { genrule { name: "frameworks-base-api-module-lib-removed.txt", srcs: [ + ":art.module.public.api{.module-lib.removed-api.txt}", ":android.net.ipsec.ike{.module-lib.removed-api.txt}", ":framework-appsearch{.module-lib.removed-api.txt}", ":framework-connectivity{.module-lib.removed-api.txt}", @@ -319,7 +328,7 @@ genrule { ], out: ["module-lib-removed.txt"], tools: ["metalava"], - cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", + cmd: metalava_cmd + "$(in) --api $(out)", dists: [ { targets: ["droidcore"], @@ -360,7 +369,7 @@ genrule { ], out: ["system-server-current.txt"], tools: ["metalava"], - cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", + cmd: metalava_cmd + "$(in) --api $(out)", dists: [ { targets: ["droidcore"], @@ -384,7 +393,7 @@ genrule { ], out: ["system-server-removed.txt"], tools: ["metalava"], - cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", + cmd: metalava_cmd + "$(in) --api $(out)", dists: [ { targets: ["droidcore"], |