|
|
@ -1,3 +1,8 @@ |
|
|
|
|
|
import kotlin.text.all |
|
|
|
|
|
import kotlin.text.find |
|
|
|
|
|
import kotlin.text.isNotEmpty |
|
|
|
|
|
import kotlin.text.replace |
|
|
|
|
|
|
|
|
plugins { |
|
|
plugins { |
|
|
id("com.android.application") |
|
|
id("com.android.application") |
|
|
id("kotlin-android") |
|
|
id("kotlin-android") |
|
|
@ -37,6 +42,22 @@ android { |
|
|
signingConfig = signingConfigs.getByName("debug") |
|
|
signingConfig = signingConfigs.getByName("debug") |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
applicationVariants.all { |
|
|
|
|
|
val variant = this |
|
|
|
|
|
variant.outputs.all { |
|
|
|
|
|
val output = this |
|
|
|
|
|
// Get the architecture (ABI) for the current output. Note: Flutter often uses 'armeabi-v7a', 'arm64-v8a', etc. |
|
|
|
|
|
val abi = output.filters.find { it.filterType == "ABI" }?.identifier?.replace("armeabi-", "") ?: "" |
|
|
|
|
|
|
|
|
|
|
|
// Make sure we are dealing with an APK output |
|
|
|
|
|
if (output is com.android.build.gradle.internal.api.ApkVariantOutputImpl) { |
|
|
|
|
|
// Append the ABI to the filename, with a hyphen if it exists |
|
|
|
|
|
val abiSuffix = if (abi.isNotEmpty()) "-$abi" else "" |
|
|
|
|
|
output.outputFileName = "Hadi & Hoda v${variant.versionName}+${variant.versionCode}${abiSuffix}.apk" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
flutter { |
|
|
flutter { |
|
|
|