Today, I want to share with you some valuable file naming scripts for gradle to change your artifact output file names.
Gradle is a build system which lets you to produce both android archives(.aar) and android packages(.apk) easily.
In android studio the gradle build settings will produce a very boring standart artifact name for you like output files by default.
To change this default file naming for your artifacts you can use the below scripts:
For your android library project you have to uncomment line 21.
For your android applications you have to uncomment line 21.
After making these changes, the output will be like that:
As you can see, the artifact output file name contains appname, current version, timestamp, flavor name, variant name.
If you have any questions, please ask in the comments below.