Merge pull request #828 from player-03/output-apk
Make Gradle use the right APK filename.
This commit is contained in:
@@ -179,20 +179,17 @@ class AndroidPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
public override function install ():Void {
|
public override function install ():Void {
|
||||||
|
|
||||||
var build = "debug";
|
var build = "-debug";
|
||||||
|
|
||||||
if (project.certificate != null) {
|
if (project.certificate != null) {
|
||||||
|
|
||||||
build = "release";
|
build = "-release";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var apkPath = FileSystem.fullPath (targetDirectory) + "/bin/app/build/outputs/apk/";
|
var apkPath = FileSystem.fullPath (targetDirectory) + "/bin/app/build/outputs/apk/" + project.app.file + build + ".apk";
|
||||||
var apkSuffix = "-" + build + ".apk";
|
|
||||||
|
|
||||||
File.copy (apkPath + "app" + apkSuffix, apkPath + project.app.file + apkSuffix);
|
deviceID = AndroidHelper.install (project, apkPath, deviceID);
|
||||||
|
|
||||||
deviceID = AndroidHelper.install (project, apkPath + project.app.file + apkSuffix, deviceID);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,16 @@ android {
|
|||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
android.applicationVariants.all { variant ->
|
||||||
|
variant.outputs.each { output ->
|
||||||
|
def outputFile = output.outputFile
|
||||||
|
|
||||||
|
if (outputFile != null && outputFile.name.endsWith('.apk')) {
|
||||||
|
output.outputFile = new File(outputFile.parent, "::APP_FILE::-" + variant.buildType.name + ".apk")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
Reference in New Issue
Block a user