Я настраиваю имя файла APK моего приложения Android в build.gradle
script следующим образом:
android {
defaultConfig {
project.ext.set("archivesBaseName", "MyApplication");
}
}
Теперь, когда я использую ароматы продукта:
android {
productFlavors {
green {
applicationId "com.example.myapplication.green"
}
blue {
applicationId "com.example.myapplication.blue"
}
}
}
Есть ли способ настроить имя каждого APK? Я экспериментировал с archiveBaseName
и baseName
без успеха. В конце я хочу найти следующие файлы:
build/outputs/apk/Blue-debug-1.2.1.apk
build/outputs/apk/Blue-debug-unaligned.apk
build/outputs/apk/Blue-release-1.2.1.apk
build/outputs/apk/Blue-release-unaligned.apk
build/outputs/apk/Green-debug-1.2.1.apk
build/outputs/apk/Green-debug-unaligned.apk
build/outputs/apk/Green-release-1.2.1.apk
build/outputs/apk/Green-release-unaligned.apk