diff options
author | Devin Moore <devinmoore@google.com> | 2022-10-19 20:41:14 +0000 |
---|---|---|
committer | Devin Moore <devinmoore@google.com> | 2022-10-19 21:28:09 +0000 |
commit | f31b6a8abbc45b0829c1af4c3d8705cb93f78b11 (patch) | |
tree | 42c8765ad9cc617c7750eda0f8203b198d0ab123 /build/aidl_gen_rule.go | |
parent | c3f7112a1ba81156a58d40a36e6223af2d06c22e (diff) | |
download | aidl-f31b6a8abbc45b0829c1af4c3d8705cb93f78b11.tar.gz |
Default Stable AIDL interfaces to version 1
This way V1 libraries will alway have the getInterfaceVersion and
getInterfaceHash, even when not frozen.
Test: atest aidl_unittests
Test: m android.hardware.fastboot-V1-ndk && verify generated source
Bug: NA
Change-Id: I8274d6faec0f198b234295a024f1684094681efb
Diffstat (limited to 'build/aidl_gen_rule.go')
-rw-r--r-- | build/aidl_gen_rule.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/build/aidl_gen_rule.go b/build/aidl_gen_rule.go index 1919f12b..472a93e6 100644 --- a/build/aidl_gen_rule.go +++ b/build/aidl_gen_rule.go @@ -171,8 +171,13 @@ func (g *aidlGenRule) generateBuildActionsForSingleAidl(ctx android.ModuleContex implicits := g.implicitInputs optionalFlags := append([]string{}, g.properties.Flags...) - if g.properties.Version != "" { - optionalFlags = append(optionalFlags, "--version "+g.properties.Version) + if proptools.Bool(g.properties.Unstable) != true { + // default version is 1 for any stable interface + version := "1" + if g.properties.Version != "" { + version = g.properties.Version + } + optionalFlags = append(optionalFlags, "--version "+version) hash := "notfrozen" if !strings.HasPrefix(baseDir, ctx.Config().SoongOutDir()) { |