Does VersionCode matter for an Android AAR library?

Viewed 34

Specifically for aar generated libraries, does the versionCode set either in the manifest or build file matter? Is it used anywhere for anything?

For an apk the docs say versionCode is used by the Play store API. I couldn't find any reference to versionCode relating to aars though.

1 Answers

For aar consumer it doesn't matter - they only need the maven artifact version.

For aar producer it matters - you may want to use it to add specific upgrade code to run only once (from version X to version Y).

I think AGP no longer requires specifying version name or code to non-app modules.

Related