summaryrefslogtreecommitdiff
path: root/apex/key.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2025-02-13 02:05:00 +0000
committer Yu Liu <yudiliu@google.com> 2025-02-19 00:18:39 +0000
commit0a37d429bcbfdf5110bbfcf14f43764dc01585a4 (patch)
treeacda2280ff7ee8cd210a9696b615297d64c4d5b4 /apex/key.go
parent9354e34a7b2ba36b1e611dc0f062416649decbeb (diff)
Change depVisitor to use providers instead of type-asserting to
interfaces directly, the next step is to change it to use ModuleProxy once IsDepInSameApex is ready. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I13a4e256a26dbf7f9b3b746d628ac8f68b4e598e
Diffstat (limited to 'apex/key.go')
-rw-r--r--apex/key.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/apex/key.go b/apex/key.go
index 1622c65e6..cc66a131f 100644
--- a/apex/key.go
+++ b/apex/key.go
@@ -33,6 +33,13 @@ func registerApexKeyBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterParallelSingletonModuleType("all_apex_certs", allApexCertsFactory)
}
+type ApexKeyInfo struct {
+ PublicKeyFile android.Path
+ PrivateKeyFile android.Path
+}
+
+var ApexKeyInfoProvider = blueprint.NewProvider[ApexKeyInfo]()
+
type apexKey struct {
android.ModuleBase
@@ -95,6 +102,11 @@ func (m *apexKey) GenerateAndroidBuildActions(ctx android.ModuleContext) {
m.publicKeyFile.String(), pubKeyName, m.privateKeyFile, privKeyName)
return
}
+
+ android.SetProvider(ctx, ApexKeyInfoProvider, ApexKeyInfo{
+ PublicKeyFile: m.publicKeyFile,
+ PrivateKeyFile: m.privateKeyFile,
+ })
}
type apexKeyEntry struct {