Ensure current.zip is put in the right place.
Using the InstallFile as the snapshot ensure that the artifact
in out/soong/mainline-sdks/ is built when building the sdk
target.
Test: m ipsec-module-sdk
Change-Id: I45ce6001dbae3a7a9c4cf50f8d7d5d67f94dbcb3
diff --git a/sdk/sdk.go b/sdk/sdk.go
index b60fb18..d3788c4 100644
--- a/sdk/sdk.go
+++ b/sdk/sdk.go
@@ -299,8 +299,8 @@
// Generate the snapshot from the member info.
p := s.buildSnapshot(ctx, sdkVariants)
- s.snapshotFile = android.OptionalPathForPath(p)
- ctx.InstallFile(android.PathForMainlineSdksInstall(ctx), s.Name()+"-current.zip", p)
+ zip := ctx.InstallFile(android.PathForMainlineSdksInstall(ctx), p.Base(), p)
+ s.snapshotFile = android.OptionalPathForPath(zip)
}
}