diff options
author | 2024-10-23 16:57:06 -0700 | |
---|---|---|
committer | 2024-10-24 10:55:33 -0700 | |
commit | a14fb6a73e2207c1084a0230fd97f08c14ef4818 (patch) | |
tree | 3300c5bf686fc67e71400ab8bac8c39b5d1c6c0b /aidl_library | |
parent | 11d0c38a2b295774f4c91f8f571323359add9835 (diff) |
Update DepSet references
Update all references to depset to use blueprint/depset, and to use
DepSet instead of *DepSet.
Bug: 375276086
Test: all soong tests pass
Flag: EXEMPT refactor
Change-Id: I59a7836d0975366ddc336225fb770ac7e6e0c8ea
Diffstat (limited to 'aidl_library')
-rw-r--r-- | aidl_library/Android.bp | 1 | ||||
-rw-r--r-- | aidl_library/aidl_library.go | 17 |
2 files changed, 10 insertions, 8 deletions
diff --git a/aidl_library/Android.bp b/aidl_library/Android.bp index 07472a492..3c386fb0f 100644 --- a/aidl_library/Android.bp +++ b/aidl_library/Android.bp @@ -20,6 +20,7 @@ bootstrap_go_package { name: "soong-aidl-library", pkgPath: "android/soong/aidl_library", deps: [ + "blueprint-depset", "soong-android", ], srcs: [ diff --git a/aidl_library/aidl_library.go b/aidl_library/aidl_library.go index 01415456d..1e0ab3056 100644 --- a/aidl_library/aidl_library.go +++ b/aidl_library/aidl_library.go @@ -17,6 +17,7 @@ package aidl_library import ( "android/soong/android" "github.com/google/blueprint" + "github.com/google/blueprint/depset" "github.com/google/blueprint/proptools" ) @@ -58,17 +59,17 @@ type AidlLibraryInfo struct { // The direct aidl files of the module Srcs android.Paths // The include dirs to the direct aidl files and those provided from transitive aidl_library deps - IncludeDirs android.DepSet[android.Path] + IncludeDirs depset.DepSet[android.Path] // The direct hdrs and hdrs from transitive deps - Hdrs android.DepSet[android.Path] + Hdrs depset.DepSet[android.Path] } // AidlLibraryProvider provides the srcs and the transitive include dirs var AidlLibraryProvider = blueprint.NewProvider[AidlLibraryInfo]() func (lib *AidlLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) { - includeDirsDepSetBuilder := android.NewDepSetBuilder[android.Path](android.PREORDER) - hdrsDepSetBuilder := android.NewDepSetBuilder[android.Path](android.PREORDER) + includeDirsDepSetBuilder := depset.NewBuilder[android.Path](depset.PREORDER) + hdrsDepSetBuilder := depset.NewBuilder[android.Path](depset.PREORDER) if len(lib.properties.Srcs) == 0 && len(lib.properties.Hdrs) == 0 { ctx.ModuleErrorf("at least srcs or hdrs prop must be non-empty") @@ -100,15 +101,15 @@ func (lib *AidlLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) { for _, dep := range ctx.GetDirectDepsWithTag(aidlLibraryTag) { if info, ok := android.OtherModuleProvider(ctx, dep, AidlLibraryProvider); ok { - includeDirsDepSetBuilder.Transitive(&info.IncludeDirs) - hdrsDepSetBuilder.Transitive(&info.Hdrs) + includeDirsDepSetBuilder.Transitive(info.IncludeDirs) + hdrsDepSetBuilder.Transitive(info.Hdrs) } } android.SetProvider(ctx, AidlLibraryProvider, AidlLibraryInfo{ Srcs: srcs, - IncludeDirs: *includeDirsDepSetBuilder.Build(), - Hdrs: *hdrsDepSetBuilder.Build(), + IncludeDirs: includeDirsDepSetBuilder.Build(), + Hdrs: hdrsDepSetBuilder.Build(), }) } |