This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 760
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create sane APK names from gradle builds
- Loading branch information
1 parent
b71fa87
commit cb0d394
Showing
4 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
eddystone-uid/tools/txeddystone-uid/TxEddystone-UID/variants.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Name and version the APK variants. | ||
|
||
android.applicationVariants.all { variant -> | ||
def outName | ||
if (project.hasProperty("applicationName")) { | ||
outName = applicationName | ||
} else { | ||
outName = parent.name | ||
} | ||
|
||
variant.outputs.each { output -> | ||
def apkName | ||
if (output.zipAlign) { | ||
apkName = "${outName}-${output.baseName}-${variant.versionName}.apk" | ||
} else { | ||
apkName = "${outName}-${output.baseName}-${variant.versionName}-unaligned.apk" | ||
} | ||
output.outputFile = new File(output.outputFile.parent, apkName) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
apply plugin: 'com.android.application' | ||
apply from: '../variants.gradle' | ||
|
||
android { | ||
compileSdkVersion 22 | ||
|
20 changes: 20 additions & 0 deletions
20
tools/eddystone-validator/EddystoneValidator/variants.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Name and version the APK variants. | ||
|
||
android.applicationVariants.all { variant -> | ||
def outName | ||
if (project.hasProperty("applicationName")) { | ||
outName = applicationName | ||
} else { | ||
outName = parent.name | ||
} | ||
|
||
variant.outputs.each { output -> | ||
def apkName | ||
if (output.zipAlign) { | ||
apkName = "${outName}-${output.baseName}-${variant.versionName}.apk" | ||
} else { | ||
apkName = "${outName}-${output.baseName}-${variant.versionName}-unaligned.apk" | ||
} | ||
output.outputFile = new File(output.outputFile.parent, apkName) | ||
} | ||
} |