diff options
author | 2024-10-17 13:28:34 -0700 | |
---|---|---|
committer | 2024-10-17 13:28:34 -0700 | |
commit | 64f2d844f27511ffdc062fe77384577d33d62880 (patch) | |
tree | bb9252fc4d53b8e1c00e462eb7e16d8b931af84c /java/sdk_library_internal.go | |
parent | 991d11df34cc11d0dd71c8e4334fc3fc9e28e054 (diff) |
Make uses_libs and optional_uses_libs configurable
Requested for the mk2bp conversion.
Fixes: 373772769
Test: m nothing --no-skip-soong-tests
Change-Id: I9a36e73f20c73e25b555fb3f0a074b30a548ae50
Diffstat (limited to 'java/sdk_library_internal.go')
-rw-r--r-- | java/sdk_library_internal.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/sdk_library_internal.go b/java/sdk_library_internal.go index ca088cf68..768e57a11 100644 --- a/java/sdk_library_internal.go +++ b/java/sdk_library_internal.go @@ -566,7 +566,7 @@ func (module *SdkLibrary) createXmlFile(mctx android.DefaultableHookContext) { Min_device_sdk *string Max_device_sdk *string Sdk_library_min_api_level *string - Uses_libs_dependencies []string + Uses_libs_dependencies proptools.Configurable[[]string] }{ Name: proptools.StringPtr(module.xmlPermissionsModuleName()), Enabled: module.EnabledProperty(), @@ -577,7 +577,7 @@ func (module *SdkLibrary) createXmlFile(mctx android.DefaultableHookContext) { Min_device_sdk: module.commonSdkLibraryProperties.Min_device_sdk, Max_device_sdk: module.commonSdkLibraryProperties.Max_device_sdk, Sdk_library_min_api_level: &moduleMinApiLevelStr, - Uses_libs_dependencies: module.usesLibraryProperties.Uses_libs, + Uses_libs_dependencies: module.usesLibraryProperties.Uses_libs.Clone(), } mctx.CreateModule(sdkLibraryXmlFactory, &props) @@ -742,7 +742,7 @@ type sdkLibraryXmlProperties struct { // Uses-libs dependencies that the shared library requires to work correctly. // // This will add dependency="foo:bar" to the <library> section. - Uses_libs_dependencies []string + Uses_libs_dependencies proptools.Configurable[[]string] } // java_sdk_library_xml builds the permission xml file for a java_sdk_library. @@ -864,7 +864,7 @@ func (module *sdkLibraryXml) permissionsContents(ctx android.ModuleContext) stri implicitUntilAttr := formattedOptionalSdkLevelAttribute(ctx, "on-bootclasspath-before", module.properties.On_bootclasspath_before) minSdkAttr := formattedOptionalSdkLevelAttribute(ctx, "min-device-sdk", module.properties.Min_device_sdk) maxSdkAttr := formattedOptionalSdkLevelAttribute(ctx, "max-device-sdk", module.properties.Max_device_sdk) - dependenciesAttr := formattedDependenciesAttribute(module.properties.Uses_libs_dependencies) + dependenciesAttr := formattedDependenciesAttribute(module.properties.Uses_libs_dependencies.GetOrDefault(ctx, nil)) // <library> is understood in all android versions whereas <apex-library> is only understood from API T (and ignored before that). // similarly, min_device_sdk is only understood from T. So if a library is using that, we need to use the apex-library to make sure this library is not loaded before T var libraryTag string |