I have a project with several modules in it one of which is a Android Library named (poorly) as sdk. When I build the project it outputs an AAR named sdk.aar<
sdk
sdk.aar<
For the latest version of Gradle 5+, this is the best answer following @frouo answer:
defaultConfig { ... setProperty("archivesBaseName", "${archivesBaseName}-$versionName") ... }
AAR extension will be added automatically.