How to set name of AAR output from Gradle

后端 未结 7 441
一整个雨季
一整个雨季 2021-01-30 10:18

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<

7条回答
  •  一生所求
    2021-01-30 10:53

    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.

提交回复
热议问题