diff options
author | Paul Duffin <paulduffin@google.com> | 2021-07-15 14:14:41 +0100 |
---|---|---|
committer | Paul Duffin <paulduffin@google.com> | 2021-07-15 16:00:11 +0100 |
commit | 7b3e10a1c2dfdc2c7cba7d6a7c9a0881ee149ce6 (patch) | |
tree | 25c78ad5d02303b2c12853e8162412084f5fcb2c /sdk/bootclasspath_fragment_sdk_test.go | |
parent | fa20b187dc2471b9cd0705e4c95e7bed1fcd503c (diff) |
Propagate permitted packages to sdk snapshot
Previously, permitted_packages were not copied to the sdk snapshot.
This change corrects that.
Bug: 193763688
Test: m nothing
- Added unit tests, which all failed and then fixed the tests.
Merged-In: I4560987f746f78c0ae706058195b6db4bea438aa
Change-Id: I4560987f746f78c0ae706058195b6db4bea438aa
(cherry picked from commit 869de147abdb2c86a91cced4fda7d27746c52af4)
Diffstat (limited to 'sdk/bootclasspath_fragment_sdk_test.go')
-rw-r--r-- | sdk/bootclasspath_fragment_sdk_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sdk/bootclasspath_fragment_sdk_test.go b/sdk/bootclasspath_fragment_sdk_test.go index 9b7b86866..c30324a85 100644 --- a/sdk/bootclasspath_fragment_sdk_test.go +++ b/sdk/bootclasspath_fragment_sdk_test.go @@ -346,6 +346,7 @@ java_import { visibility: ["//visibility:public"], apex_available: ["myapex"], jars: ["java/mybootlib.jar"], + permitted_packages: ["mybootlib"], } java_sdk_library_import { @@ -355,6 +356,7 @@ java_sdk_library_import { apex_available: ["myapex"], shared_library: true, compile_dex: true, + permitted_packages: ["myothersdklibrary"], public: { jars: ["sdk_library/public/myothersdklibrary-stubs.jar"], stub_srcs: ["sdk_library/public/myothersdklibrary_stub_sources"], @@ -428,6 +430,7 @@ java_import { visibility: ["//visibility:public"], apex_available: ["myapex"], jars: ["java/mybootlib.jar"], + permitted_packages: ["mybootlib"], } java_sdk_library_import { @@ -437,6 +440,7 @@ java_sdk_library_import { apex_available: ["myapex"], shared_library: true, compile_dex: true, + permitted_packages: ["myothersdklibrary"], public: { jars: ["sdk_library/public/myothersdklibrary-stubs.jar"], stub_srcs: ["sdk_library/public/myothersdklibrary_stub_sources"], @@ -677,6 +681,7 @@ func TestSnapshotWithBootclasspathFragment_HiddenAPI(t *testing.T) { srcs: ["Test.java"], compile_dex: true, public: {enabled: true}, + permitted_packages: ["mysdklibrary"], } `), ).RunTest(t) @@ -720,6 +725,7 @@ java_import { visibility: ["//visibility:public"], apex_available: ["myapex"], jars: ["java/mybootlib.jar"], + permitted_packages: ["mybootlib"], } java_sdk_library_import { @@ -729,6 +735,7 @@ java_sdk_library_import { apex_available: ["//apex_available:platform"], shared_library: true, compile_dex: true, + permitted_packages: ["mysdklibrary"], public: { jars: ["sdk_library/public/mysdklibrary-stubs.jar"], stub_srcs: ["sdk_library/public/mysdklibrary_stub_sources"], |