use better apk names
This commit is contained in:
@@ -96,8 +96,8 @@
|
||||
<orderEntry type="library" exported="" name="animated-vector-drawable-23.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-23.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="recyclerview-v7-23.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-23.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="core-3.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-23.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-vector-drawable-23.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="zxing-android-embedded-3.2.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="design-23.2.1" level="project" />
|
||||
|
||||
@@ -27,6 +27,27 @@ 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.outputFile = new File(output.outputFile.parent, newApkName)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.android.support:appcompat-v7:23.0.1'
|
||||
|
||||
Reference in New Issue
Block a user