diff options
Diffstat (limited to 'java/sdk_library.go')
-rw-r--r-- | java/sdk_library.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go index f2d0c597e..c0e566283 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -1893,6 +1893,10 @@ type sdkLibraryImportProperties struct { // If set to true, compile dex files for the stubs. Defaults to false. Compile_dex *bool + + // If not empty, classes are restricted to the specified packages and their sub-packages. + // This information is used to generate the updatable-bcp-packages.txt file. + Permitted_packages []string } type SdkLibraryImport struct { @@ -2506,6 +2510,8 @@ type sdkLibrarySdkMemberProperties struct { // The paths to the doctag files to add to the prebuilt. Doctag_paths android.Paths + + Permitted_packages []string } type scopeProperties struct { @@ -2546,6 +2552,7 @@ func (s *sdkLibrarySdkMemberProperties) PopulateFromVariant(ctx android.SdkMembe s.Shared_library = proptools.BoolPtr(sdk.sharedLibrary()) s.Compile_dex = sdk.dexProperties.Compile_dex s.Doctag_paths = sdk.doctagPaths + s.Permitted_packages = sdk.PermittedPackagesForUpdatableBootJars() } func (s *sdkLibrarySdkMemberProperties) AddToPropertySet(ctx android.SdkMemberContext, propertySet android.BpPropertySet) { @@ -2558,6 +2565,9 @@ func (s *sdkLibrarySdkMemberProperties) AddToPropertySet(ctx android.SdkMemberCo if s.Compile_dex != nil { propertySet.AddProperty("compile_dex", *s.Compile_dex) } + if len(s.Permitted_packages) > 0 { + propertySet.AddProperty("permitted_packages", s.Permitted_packages) + } for _, apiScope := range allApiScopes { if properties, ok := s.Scopes[apiScope]; ok { |