From a377e4c85e5c21759564e6e077d1402ef6fca16e Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Wed, 29 Apr 2020 13:30:54 +0100 Subject: java_sdk_library: Allow separate api/stubs source modules The API file for a scope represents the differences between the API provided by that scope and that provided by the scope that it extends. On the other hand the stubs source for a scope represents the union of the API provided by the scope and the scope it extends (all the way back to public). Unfortunately, while metalava supports this behavior for scopes that extend public (e.g. system and test) it does not support this behavior for scopes that extend others, e.g. module_lib which extends system. This is because it always assumes that the baseline for the API file is 'public' and so has no way to defined other baselines. This change works around that by having separate droidstubs modules to generate the API and stubs sources for scopes that require different arguments to generate the API and stubs sources. Test: m checkapi Bug: 155164730 Merged-In: Iea7d59852d7aeb503120acf3c44e08eb0d9d07b9 Change-Id: Iea7d59852d7aeb503120acf3c44e08eb0d9d07b9 (cherry picked from commit 0ff08bdb075412b15e005ca9c42860c385126588) --- sdk/java_sdk_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sdk') diff --git a/sdk/java_sdk_test.go b/sdk/java_sdk_test.go index bb5cbbe9..acacd97e 100644 --- a/sdk/java_sdk_test.go +++ b/sdk/java_sdk_test.go @@ -1314,8 +1314,8 @@ sdk_snapshot { .intermediates/myjavalib.stubs.source.system/android_common/myjavalib.stubs.source.system_api.txt -> sdk_library/system/myjavalib.txt .intermediates/myjavalib.stubs.source.system/android_common/myjavalib.stubs.source.system_api.txt -> sdk_library/system/myjavalib-removed.txt .intermediates/myjavalib.stubs.module_lib/android_common/javac/myjavalib.stubs.module_lib.jar -> sdk_library/module_lib/myjavalib-stubs.jar -.intermediates/myjavalib.stubs.source.module_lib/android_common/myjavalib.stubs.source.module_lib_api.txt -> sdk_library/module_lib/myjavalib.txt -.intermediates/myjavalib.stubs.source.module_lib/android_common/myjavalib.stubs.source.module_lib_api.txt -> sdk_library/module_lib/myjavalib-removed.txt +.intermediates/myjavalib.api.module_lib/android_common/myjavalib.api.module_lib_api.txt -> sdk_library/module_lib/myjavalib.txt +.intermediates/myjavalib.api.module_lib/android_common/myjavalib.api.module_lib_api.txt -> sdk_library/module_lib/myjavalib-removed.txt `), checkMergeZips( ".intermediates/mysdk/common_os/tmp/sdk_library/public/myjavalib_stub_sources.zip", -- cgit v1.2.3