diff options
| author | mosimchah <mosimchah@gmail.com> | 2025-12-02 09:27:38 -0500 |
|---|---|---|
| committer | mosimchah <mosimchah@gmail.com> | 2025-12-02 09:27:38 -0500 |
| commit | c7bade461dc55726f62997d13a48582f7c4b4655 (patch) | |
| tree | ea0588da76060a2038f54f67efd046ca77634b10 /java/systemserver_classpath_fragment.go | |
| parent | 0f5414d19317805e8bbbe7c4db5f0fd78769bad5 (diff) | |
| parent | 89d78cff8b00d3b20a90074635c3fe5a2ee49474 (diff) | |
Merge branch 'lineage-23.1' of https://github.com/LineageOS/android_build_soong into HEADw16.1
* 'lineage-23.1' of https://github.com/LineageOS/android_build_soong: (528 commits)
Revert "install_symlink: Make symlink target configurable"
Reapply "Clear as much of cc.Module as possible after GenerateBuildActions"
Revert "rust: config: Fix missing CPU variant LD flags in Rust"
Rename build-flag in outdir
Revert^4 "cipd: Default CIPD proxy server to on, add opt-out"
Convert check-vintf-all to phony with actions
Create a partial implementation of check-vintf-all for soong-only
Configure RBE rust pool based on build variant
Revert^3 "Add sdk version check to arr"
Add jdk.internal.invoke to the allowlist
Make droid always depend on symbols zip
Import Device and Odm skus
Don't install gob_gen in Soong
Remove bazel reference from run_integration_tests.sh
Fix bootstrap_test.sh
Don't panic in aconfig libraries when AllowMissingDependencies is set
Avoid returning nil paths from PathForModuleSrc
Revert "Flag controled clang version"
Rework module target dependencies on required deps
Revert^2 "Add sdk version check to arr"
...
Change-Id: I6e9a63fa14fda917a42e426e5dcebbad7f67e1de
Diffstat (limited to 'java/systemserver_classpath_fragment.go')
| -rw-r--r-- | java/systemserver_classpath_fragment.go | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/java/systemserver_classpath_fragment.go b/java/systemserver_classpath_fragment.go index a60f6b82c..345090067 100644 --- a/java/systemserver_classpath_fragment.go +++ b/java/systemserver_classpath_fragment.go @@ -97,6 +97,13 @@ type SystemServerClasspathModule struct { var _ android.ApexModule = (*SystemServerClasspathModule)(nil) +type SystemServerClasspathInfo struct { + Contents []string + StandaloneContents []string +} + +var SystemServerClasspathInfoProvider = blueprint.NewProvider[SystemServerClasspathInfo]() + func (m *SystemServerClasspathModule) MinSdkVersionSupported(ctx android.BaseModuleContext) android.ApiLevel { return android.MinApiLevel } @@ -139,6 +146,11 @@ func (s *SystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.Mo classpathJars = append(classpathJars, standaloneClasspathJars...) s.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, configuredJars, classpathJars) s.setPartitionInfoOfLibraries(ctx) + + android.SetProvider(ctx, SystemServerClasspathInfoProvider, SystemServerClasspathInfo{ + Contents: s.properties.Contents.GetOrDefault(ctx, nil), + StandaloneContents: s.properties.Standalone_contents.GetOrDefault(ctx, nil), + }) } // Map of java library name to their install partition. @@ -152,8 +164,9 @@ var LibraryNameToPartitionInfoProvider = blueprint.NewProvider[LibraryNameToPart func (s *SystemServerClasspathModule) setPartitionInfoOfLibraries(ctx android.ModuleContext) { libraryNameToPartition := map[string]string{} - ctx.VisitDirectDepsWithTag(systemServerClasspathFragmentContentDepTag, func(m android.Module) { - libraryNameToPartition[m.Name()] = m.PartitionTag(ctx.DeviceConfig()) + ctx.VisitDirectDepsProxyWithTag(systemServerClasspathFragmentContentDepTag, func(m android.ModuleProxy) { + info := android.OtherModulePointerProviderOrDefault(ctx, m, android.CommonModuleInfoProvider) + libraryNameToPartition[m.Name()] = info.PartitionTag }) android.SetProvider(ctx, LibraryNameToPartitionInfoProvider, LibraryNameToPartitionInfo{ LibraryNameToPartition: libraryNameToPartition, @@ -214,10 +227,10 @@ func (systemServerClasspathFragmentContentDependencyTag) ReplaceSourceWithPrebui // SdkMemberType causes dependencies added with this tag to be automatically added to the sdk as if // they were specified using java_systemserver_libs or java_sdk_libs. -func (b systemServerClasspathFragmentContentDependencyTag) SdkMemberType(child android.Module) android.SdkMemberType { +func (b systemServerClasspathFragmentContentDependencyTag) SdkMemberType(ctx android.ModuleContext, child android.ModuleProxy) android.SdkMemberType { // If the module is a java_sdk_library then treat it as if it was specified in the java_sdk_libs // property, otherwise treat if it was specified in the java_systemserver_libs property. - if javaSdkLibrarySdkMemberType.IsInstance(child) { + if javaSdkLibrarySdkMemberType.IsInstance(ctx, child) { return javaSdkLibrarySdkMemberType } @@ -278,8 +291,8 @@ func (s *systemServerClasspathFragmentMemberType) AddDependencies(ctx android.Sd ctx.AddVariationDependencies(nil, dependencyTag, names...) } -func (s *systemServerClasspathFragmentMemberType) IsInstance(module android.Module) bool { - _, ok := module.(*SystemServerClasspathModule) +func (s *systemServerClasspathFragmentMemberType) IsInstance(ctx android.ModuleContext, module android.ModuleProxy) bool { + _, ok := android.OtherModuleProvider(ctx, module, SystemServerClasspathInfoProvider) return ok } @@ -305,11 +318,11 @@ type systemServerClasspathFragmentSdkMemberProperties struct { Standalone_contents []string } -func (s *systemServerClasspathFragmentSdkMemberProperties) PopulateFromVariant(ctx android.SdkMemberContext, variant android.Module) { - module := variant.(*SystemServerClasspathModule) +func (s *systemServerClasspathFragmentSdkMemberProperties) PopulateFromVariant(ctx android.SdkMemberContext, variant android.ModuleProxy) { + module := android.OtherModuleProviderOrDefault(ctx.SdkModuleContext(), variant, SystemServerClasspathInfoProvider) - s.Contents = module.properties.Contents.GetOrDefault(ctx.SdkModuleContext(), nil) - s.Standalone_contents = module.properties.Standalone_contents.GetOrDefault(ctx.SdkModuleContext(), nil) + s.Contents = module.Contents + s.Standalone_contents = module.StandaloneContents } func (s *systemServerClasspathFragmentSdkMemberProperties) AddToPropertySet(ctx android.SdkMemberContext, propertySet android.BpPropertySet) { |
