aboutsummaryrefslogtreecommitdiffstats
path: root/sdk
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2020-04-29 13:30:54 +0100
committerPaul Duffin <paulduffin@google.com>2020-05-13 11:29:00 +0100
commita377e4c85e5c21759564e6e077d1402ef6fca16e (patch)
tree5d1dcf9534deca375da4fe0870e08d0910461d4d /sdk
parent153501f6618e2b1b4f8dc167f0c749ec4420ac31 (diff)
downloadbuild_soong-a377e4c85e5c21759564e6e077d1402ef6fca16e.tar.gz
build_soong-a377e4c85e5c21759564e6e077d1402ef6fca16e.tar.bz2
build_soong-a377e4c85e5c21759564e6e077d1402ef6fca16e.zip
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)
Diffstat (limited to 'sdk')
-rw-r--r--sdk/java_sdk_test.go4
1 files changed, 2 insertions, 2 deletions
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",