Closed bricestacey closed 8 years ago
That path is just used for the output. Not for the name itself. Android gradle plugin has a archivesBaseName or something that's called like. With that you can change the apk name and that one is also the preferred way since the one you use has never been meant to be a stable API.
I'll give that a shot and follow up.
Now that I'm on my computer I can show you how I use it:
defaultConfig {
archivesBaseName = "app-$versionName"
}
That way it'll work.
That fixes it up. Thanks.
I wasn't too happy with the resulting filenames using the archivesBaseName
property so I simply moved the apply plugin: 'com.vanniktech.android.apk.size'
after my code that renamed the output files and it worked great without me having to change anything.
Alright cool thanks for letting me know
I modify the variant filenames, so the plugin does not find the resulting apks. Is there anything that can be done to resolve that? Here is my code.
I'm thinking somewhere here https://github.com/vanniktech/gradle-android-apk-size-plugin/blob/b7103c46f4c9eee947d89cae7ab0b93ff56cc009/src/main/groovy/com/vanniktech/android/apk/size/ApkSizePlugin.groovy#L24 we could use the
variant.outputFile
instead of generating the path yourself.