From 3f2ccc7786ca0900fdd62e1fcc3f74ab13415da2 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Wed, 4 Nov 2015 23:36:00 -0800 Subject: [PATCH] Constants. --- .../com/beust/kobalt/plugin/android/AndroidPlugin.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/plugin/android/AndroidPlugin.kt b/src/main/kotlin/com/beust/kobalt/plugin/android/AndroidPlugin.kt index 05ca041a..e1cbc3e4 100644 --- a/src/main/kotlin/com/beust/kobalt/plugin/android/AndroidPlugin.kt +++ b/src/main/kotlin/com/beust/kobalt/plugin/android/AndroidPlugin.kt @@ -171,7 +171,11 @@ public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler) : return buildDir } - @Task(name = "generateDex", description = "Generate the dex file", alwaysRunAfter = arrayOf("compile")) + companion object { + const val TASK_GENERATE = "generateDex" + } + + @Task(name = TASK_GENERATE, description = "Generate the dex file", alwaysRunAfter = arrayOf("compile")) fun taskGenerateDex(project: Project) : TaskResult { // // Call dx to generate classes.dex @@ -204,7 +208,7 @@ public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler) : * jarsigner -keystore ~/.android/debug.keystore -storepass android -keypass android -signedjar a.apk a.ap_ * androiddebugkey */ - @Task(name = "signApk", description = "Generate the dex file", runAfter = arrayOf("generateDex"), + @Task(name = "signApk", description = "Sign the apk file", runAfter = arrayOf(TASK_GENERATE), runBefore = arrayOf("assemble")) fun signApk(project: Project) : TaskResult { val apk = apk(project, flavor, "apk")