You could use something like this:
defaultConfig {
applicationId "com.test.app"
versionCode 1
versionName "1.0"
setProperty("archivesBaseName", applicationId + "-v" + versionCode + "(" + versionName + ")")
}
More Related Contents:
- How to manually include external aar package using Gradle for Android
- How to create a release signed apk file using Gradle?
- HttpClient won’t import in Android Studio
- How do I show dependencies tree in Android Studio?
- Android Studio: Gradle – build fails — Execution failed for task ‘:dexDebug’
- How to set versionName in APK filename using gradle?
- Multi flavor app based on multi flavor library in Android Gradle
- Android Studio how to package single AAR from multiple library projects?
- Gradle DSL method not found: ‘runProguard’
- Android Studio: Gradle sync failed: Could not HEAD ‘…’. Received status code 502 from server: Bad Gateway [closed]
- gradle build fails on lint task
- Gradle version 2.2 is required. Current version is 2.10
- how can I add the aidl file to Android studio (from the in-app billing example)
- Android Studio Gradle issue upgrading to version 0.5.0 – Gradle Migrating From 0.8 to 0.9 – Also Android Studio upgrade to 0.8.1
- Using build types in Gradle to run same app that uses ContentProvider on one device
- How do I get a jacoco coverage report using Android gradle plugin 0.10.0 or higher?
- Why does Gradle build my module in Release mode when the app is in Debug
- Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml
- How to automatically uninstall android app from device before installing a new version
- Upgraded to Android studio 3.4 – Aapt2InternalException: AAPT2: Daemon startup failed
- Change apk name with Gradle
- How do I read properties defined in local.properties in build.gradle
- How to set up gradle and android studio to do release build?
- Confused about testCompile and androidTestCompile in Android Gradle
- Generate JavaDocs with Android Gradle plugin
- Android Gradle DexException: Multiple dex files define Lorg/hamcrest/Description
- How to exclude res folder from gradle build flavours?
- After update android studio could not create parent directory for lock file
- Android build gradle is too slow (Dependency Resolution)
- Failed to resolve: com.android.support.design:25.4.0