diff options
Diffstat (limited to 'java/sdk_library.go')
-rw-r--r-- | java/sdk_library.go | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go index 98b65dd55..b7aa4e56d 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -1744,11 +1744,13 @@ func childModuleVisibility(childVisibility []string) []string { func (module *SdkLibrary) createImplLibrary(mctx android.DefaultableHookContext) { visibility := childModuleVisibility(module.sdkLibraryProperties.Impl_library_visibility) + staticLibs := module.properties.Static_libs.Clone() + staticLibs.AppendSimpleValue(module.sdkLibraryProperties.Impl_only_static_libs) props := struct { Name *string Visibility []string Libs []string - Static_libs []string + Static_libs proptools.Configurable[[]string] Apex_available []string Stem *string }{ @@ -1757,7 +1759,7 @@ func (module *SdkLibrary) createImplLibrary(mctx android.DefaultableHookContext) Libs: append(module.properties.Libs, module.sdkLibraryProperties.Impl_only_libs...), - Static_libs: append(module.properties.Static_libs, module.sdkLibraryProperties.Impl_only_static_libs...), + Static_libs: staticLibs, // Pass the apex_available settings down so that the impl library can be statically // embedded within a library that is added to an APEX. Needed for updatable-media. Apex_available: module.ApexAvailable(), @@ -1863,7 +1865,7 @@ func (module *SdkLibrary) createStubsSourcesAndApi(mctx android.DefaultableHookC Sdk_version *string Api_surface *string System_modules *string - Libs []string + Libs proptools.Configurable[[]string] Output_javadoc_comments *bool Arg_files []string Args *string @@ -1907,10 +1909,11 @@ func (module *SdkLibrary) createStubsSourcesAndApi(mctx android.DefaultableHookC props.Installable = proptools.BoolPtr(false) // A droiddoc module has only one Libs property and doesn't distinguish between // shared libs and static libs. So we need to add both of these libs to Libs property. - props.Libs = module.properties.Libs - props.Libs = append(props.Libs, module.properties.Static_libs...) - props.Libs = append(props.Libs, module.sdkLibraryProperties.Stub_only_libs...) - props.Libs = append(props.Libs, module.scopeToProperties[apiScope].Libs...) + props.Libs = proptools.NewConfigurable[[]string](nil, nil) + props.Libs.AppendSimpleValue(module.properties.Libs) + props.Libs.Append(module.properties.Static_libs) + props.Libs.AppendSimpleValue(module.sdkLibraryProperties.Stub_only_libs) + props.Libs.AppendSimpleValue(module.scopeToProperties[apiScope].Libs) props.Aidl.Include_dirs = module.deviceProperties.Aidl.Include_dirs props.Aidl.Local_include_dirs = module.deviceProperties.Aidl.Local_include_dirs props.Java_version = module.properties.Java_version @@ -2024,7 +2027,7 @@ func (module *SdkLibrary) createApiLibrary(mctx android.DefaultableHookContext, Name *string Visibility []string Api_contributions []string - Libs []string + Libs proptools.Configurable[[]string] Static_libs []string System_modules *string Enable_validation *bool @@ -2056,11 +2059,12 @@ func (module *SdkLibrary) createApiLibrary(mctx android.DefaultableHookContext, props.Api_contributions = apiContributions // Ensure that stub-annotations is added to the classpath before any other libs - props.Libs = []string{"stub-annotations"} - props.Libs = append(props.Libs, module.properties.Libs...) - props.Libs = append(props.Libs, module.properties.Static_libs...) - props.Libs = append(props.Libs, module.sdkLibraryProperties.Stub_only_libs...) - props.Libs = append(props.Libs, module.scopeToProperties[apiScope].Libs...) + props.Libs = proptools.NewConfigurable[[]string](nil, nil) + props.Libs.AppendSimpleValue([]string{"stub-annotations"}) + props.Libs.AppendSimpleValue(module.properties.Libs) + props.Libs.Append(module.properties.Static_libs) + props.Libs.AppendSimpleValue(module.sdkLibraryProperties.Stub_only_libs) + props.Libs.AppendSimpleValue(module.scopeToProperties[apiScope].Libs) props.Static_libs = module.sdkLibraryProperties.Stub_only_static_libs props.System_modules = module.deviceProperties.System_modules @@ -2370,7 +2374,7 @@ func (module *SdkLibrary) CreateInternalModules(mctx android.DefaultableHookCont // Add the impl_only_libs and impl_only_static_libs *after* we're done using them in submodules. module.properties.Libs = append(module.properties.Libs, module.sdkLibraryProperties.Impl_only_libs...) - module.properties.Static_libs = append(module.properties.Static_libs, module.sdkLibraryProperties.Impl_only_static_libs...) + module.properties.Static_libs.AppendSimpleValue(module.sdkLibraryProperties.Impl_only_static_libs) } func (module *SdkLibrary) InitSdkLibraryProperties() { |