diff options
author | Paul Duffin <paulduffin@google.com> | 2020-05-20 16:18:00 +0100 |
---|---|---|
committer | Paul Duffin <paulduffin@google.com> | 2020-05-25 10:40:50 +0100 |
commit | 533f9c78cd61c35859f8a9e194b799f46b1df90f (patch) | |
tree | 101cbdb0c038682e74c280ba40d92c9e3fc584ce /java/java_test.go | |
parent | 5ae30792b192e256008f1f5bec5977c2d1d0a5c8 (diff) | |
download | build_soong-533f9c78cd61c35859f8a9e194b799f46b1df90f.tar.gz build_soong-533f9c78cd61c35859f8a9e194b799f46b1df90f.tar.bz2 build_soong-533f9c78cd61c35859f8a9e194b799f46b1df90f.zip |
Retry: "java_sdk_library: Improve consistency with ..._import"
The scopePaths struct is used by both java_sdk_library and its prebuilt
but was not populated in the same way. This change addresses those
discrepancies in preparation for a follow up change which will allow
access to some of those fields through OutputFileProvider.
Changes:
* Document the scopePaths field and struct.
* Switch those fields that may not be fully populated from Paths to
OptionalPath to make that 100% clear and protect against unchecked
use.
* Switch java_sdk_library_import to use the dependency extraction
mechanism driven by the dependency tag. This should actually have
been part of the change that added that mechanism.
* Only create prebuilt_stubs_sources if sources have been provided.
* Add dependencies from java_sdk_library_import on its stubs source
child modules if sources have been provided. That will ensure the
stubsSrcJar field is updated.
* Updates current/removedApiFilePath if provided for the scope in
java_sdk_library_import.
* Extracts ApiStubsSrcProvider from ApiStubsProvider to allow it to
be implemented by PrebuiltStubsSources so that it can provide access
to the stubs src jar that it creates.
Test: m nothing
Bug: 148080325
Bug: 155164730
(cherry picked from commit 0f8faffdc0e039bb73305d2a53a2d17029cdb469)
Change-Id: Ib56ca608d6fc1357d3d89e9c4cfed6ff8da11735
Diffstat (limited to 'java/java_test.go')
-rw-r--r-- | java/java_test.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/java/java_test.go b/java/java_test.go index b8abacb5..16200119 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -575,6 +575,7 @@ func TestJavaSdkLibraryImport(t *testing.T) { }, test: { jars: ["c.jar"], + stub_srcs: ["c.java"], }, } `) |