From 179d97038bf9213cc6de34d4d74cb8394054f4d7 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 18 Oct 2019 13:57:19 +0100 Subject: [PATCH] Ignore classes on the classpath when generating stubs This prevents metalava from generating stubs that reference classes which are provided on the classpath. That ensures that removing hidden classes from the sources does not result in references to those removed classes from being added to the generated stubs, e.g. in the imports. Specifically needed to prevent the StrictMode stubs class from referencing dalvik.system.CloseGuard when that is removed from the sourcepath as a result of switching the stub generation from using libcore implementation classes (which contain CloseGuard) to generated stubs (which does not contain CloseGuard). Bug: 142113521 Test: m checkbuild Change-Id: Ib4b87fec6549b69cc69820bc8d8b33f8c4e8535c --- Android.bp | 1 + 1 file changed, 1 insertion(+) diff --git a/Android.bp b/Android.bp index 7e659247c7344..f735f9e34f390 100644 --- a/Android.bp +++ b/Android.bp @@ -914,6 +914,7 @@ framework_docs_only_libs = [ ] metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " + + "--ignore-classes-on-classpath " + "--hide-package com.android.okhttp " + "--hide-package com.android.org.conscrypt --hide-package com.android.server " + "--error UnhiddenSystemApi " +