Use glob for java_sdk_library_import stub_srcs
Some java_sdk_library modules do not have any stubs for some API scopes. That results in an empty ".srcjar" being created for them which ends up not creating a directory for the stubs sources when that snapshot is unzipped. Previously, that would cause a build failure as the generated java_sdk_library_import module used the directory, which did not exist, in its stub_srcs property. This change switches the stubs_srcs property to use a glob pattern of "**/*.java" relative to the directory instead of using the directory directly. When the directory does not exist the glob pattern is resolved to an empty set of paths and does not break the build. Bug: 172811712 Test: Add sdkextensions-sdk sdk module (local patch) m sdk-extensions (local patch) unpack generated snapshot m nothing - results in build failure due to missing directory Make this change and repeat above except this time the build works. Change-Id: I691ffbfdc01ba89bbcaf647dcbb7dfebc3c8aec2
Loading
Please register or sign in to comment