update workflow to upload apks with build time in name

This commit is contained in:
2025-05-16 05:09:04 +03:00
parent 7369fd5c70
commit 618388a719
2 changed files with 33 additions and 6 deletions
+13
View File
@@ -1,3 +1,4 @@
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
import java.util.Properties
plugins {
@@ -58,6 +59,18 @@ android {
}
}
applicationVariants.all {
outputs.all {
val date = System.currentTimeMillis() / 1000
val buildType = buildType.name
val appVersion = versionName
val appVersionCode = versionCode
val newApkName = "app-$buildType-v$appVersion($appVersionCode)-$date.apk"
(this as? BaseVariantOutputImpl)?.outputFileName = newApkName
}
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"