Skip to content

Commit

Permalink
ACardEmulator: simplify naming of resulting apk
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmorgner committed Nov 29, 2024
1 parent 3c2e54b commit aa29a60
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions ACardEmulator/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ android {
targetSdkVersion 30
versionCode 8
versionName "3.5"
archivesBaseName = "ACardEmulator-$versionName"
}
buildTypes {
release {
Expand Down Expand Up @@ -48,27 +49,6 @@ android {
}
}

android.applicationVariants.all { variant ->
def appName
//Check if an applicationName property is supplied; if not use the name of the parent project.
if (project.hasProperty("applicationName")) {
appName = applicationName
} else {
appName = parent.name
}

variant.outputs.each { output ->
def newApkName
//If there's no ZipAlign task it means that our artifact will be unaligned and we need to mark it as such.
if (output.zipAlign) {
newApkName = "${appName}-${output.baseName}-${variant.versionName}.apk"
} else {
newApkName = "${appName}-${output.baseName}-${variant.versionName}-unaligned.apk"
}
output.outputFileName = new File(newApkName)
}
}

repositories {
mavenCentral()
}
Expand Down

0 comments on commit aa29a60

Please sign in to comment.