I'm using this quit ugly way
variant.outputs.each { output ->
File file = output.outputFile
String gitHash = scmService.getLastCommitHashShort()
def parentProjectName = (project.parent.name != project.name) ?
project.parent.name + '-' : ''
def name = output.outputFile.name.replace("-",
",").replace(project.name.replace("-", ",") + ",",
parentProjectName + project.name + "-" +
project.ext.getProjectVersion() + "-" +
variant.mergedFlavor.versionCode + "-" + gitHash + "-")
output.outputFile = new File(file.parent, name)
}
Because I want to keep all possible suffix that gradle plugin add at the
end of the name by default like debug, release, unsigned or possible split
variants, etc.
I not found the better way.
Would be great if output object have methods like getNameSuffix()
Dne čtvrtek 11. dubna 2013 13:59:36 UTC+2 Stefan Hoth napsal(a):
>
> Hi again,
>
> I was trying to get the version number of the
> "installMyFlavorRelease"-build. I was trying to modify the outputFile
> property in build variants but this is read only.
>
> My prefered output format would be <projectname>-<flavor>-<version>-<build
> type>.apk
>
> How can I do this?
>
> - Stefan
>
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.