Rename task classes to be more consistent.
Xavier Ducrohet [Fri, 31 Aug 2012 20:10:11 +0000 (13:10 -0700)]
Change-Id: Ied2249cfe8b5621749de7772e6574b589702bbde

gradle/src/main/groovy/com/android/build/gradle/AndroidBasePlugin.groovy
gradle/src/main/groovy/com/android/build/gradle/AndroidLibraryPlugin.groovy
gradle/src/main/groovy/com/android/build/gradle/AndroidPlugin.groovy
gradle/src/main/groovy/com/android/build/gradle/CrunchResourcesTask.groovy [moved from gradle/src/main/groovy/com/android/build/gradle/CrunchResources.groovy with 95% similarity]
gradle/src/main/groovy/com/android/build/gradle/DexTask.groovy [moved from gradle/src/main/groovy/com/android/build/gradle/Dex.groovy with 97% similarity]
gradle/src/main/groovy/com/android/build/gradle/InstallTask.groovy [moved from gradle/src/main/groovy/com/android/build/gradle/InstallApplication.groovy with 93% similarity]
gradle/src/main/groovy/com/android/build/gradle/PackageApplicationTask.groovy [moved from gradle/src/main/groovy/com/android/build/gradle/PackageApplication.groovy with 96% similarity]
gradle/src/main/groovy/com/android/build/gradle/ProcessManifestTask.groovy [moved from gradle/src/main/groovy/com/android/build/gradle/ProcessManifest.groovy with 94% similarity]
gradle/src/main/groovy/com/android/build/gradle/ProcessResourcesTask.groovy [moved from gradle/src/main/groovy/com/android/build/gradle/ProcessResources.groovy with 97% similarity]
gradle/src/main/groovy/com/android/build/gradle/UninstallTask.groovy [moved from gradle/src/main/groovy/com/android/build/gradle/UninstallApplication.groovy with 95% similarity]
gradle/src/main/groovy/com/android/build/gradle/ZipAlignTask.groovy [moved from gradle/src/main/groovy/com/android/build/gradle/ZipAlign.groovy with 96% similarity]

index 921076a..ae39942 100644 (file)
@@ -159,10 +159,10 @@ abstract class AndroidBasePlugin {
         return androidBuilder.runtimeClasspath.join(":")
     }
 
-    protected ProcessManifest createProcessManifestTask(ApplicationVariant variant,
+    protected ProcessManifestTask createProcessManifestTask(ApplicationVariant variant,
                                                         String manifestOurDir) {
         def processManifestTask = project.tasks.add("process${variant.name}Manifest",
-                ProcessManifest)
+                ProcessManifestTask)
         processManifestTask.plugin = this
         processManifestTask.variant = variant
         processManifestTask.configObjects = variant.configObjects
@@ -174,8 +174,8 @@ abstract class AndroidBasePlugin {
         return processManifestTask
     }
 
-    protected CrunchResources createCrunchResTask(ApplicationVariant variant) {
-        def crunchTask = project.tasks.add("crunch${variant.name}Res", CrunchResources)
+    protected CrunchResourcesTask createCrunchResTask(ApplicationVariant variant) {
+        def crunchTask = project.tasks.add("crunch${variant.name}Res", CrunchResourcesTask)
         crunchTask.plugin = this
         crunchTask.variant = variant
         crunchTask.configObjects = variant.configObjects
@@ -188,7 +188,7 @@ abstract class AndroidBasePlugin {
     }
 
     protected GenerateBuildConfigTask createBuildConfigTask(ApplicationVariant variant,
-                                                            ProcessManifest processManifestTask) {
+                                                            ProcessManifestTask processManifestTask) {
         def generateBuildConfigTask = project.tasks.add(
                 "generate${variant.name}BuildConfig", GenerateBuildConfigTask)
         if (processManifestTask != null) {
@@ -205,10 +205,10 @@ abstract class AndroidBasePlugin {
         return generateBuildConfigTask
     }
 
-    protected ProcessResources createProcessResTask(ApplicationVariant variant,
-                                                    ProcessManifest processManifestTask,
-                                                    CrunchResources crunchTask) {
-        def processResources = project.tasks.add("process${variant.name}Res", ProcessResources)
+    protected ProcessResourcesTask createProcessResTask(ApplicationVariant variant,
+                                                    ProcessManifestTask processManifestTask,
+                                                    CrunchResourcesTask crunchTask) {
+        def processResources = project.tasks.add("process${variant.name}Res", ProcessResourcesTask)
         processResources.dependsOn processManifestTask
         processResources.plugin = this
         processResources.variant = variant
@@ -242,7 +242,7 @@ abstract class AndroidBasePlugin {
 
     protected void createCompileTask(ApplicationVariant variant,
                                      ApplicationVariant testedVariant,
-                                     ProcessResources processResources,
+                                     ProcessResourcesTask processResources,
                                      GenerateBuildConfigTask generateBuildConfigTask) {
         def compileTask = project.tasks.add("compile${variant.name}", Compile)
         compileTask.dependsOn processResources, generateBuildConfigTask
@@ -328,7 +328,7 @@ abstract class AndroidBasePlugin {
                                    boolean isTestApk) {
         // Add a dex task
         def dexTaskName = "dex${variant.name}"
-        def dexTask = project.tasks.add(dexTaskName, Dex)
+        def dexTask = project.tasks.add(dexTaskName, DexTask)
         dexTask.dependsOn variant.compileTask
         dexTask.plugin = this
         dexTask.variant = variant
@@ -341,7 +341,7 @@ abstract class AndroidBasePlugin {
         dexTask.dexOptions = extension.dexOptions
 
         // Add a task to generate application package
-        def packageApp = project.tasks.add("package${variant.name}", PackageApplication)
+        def packageApp = project.tasks.add("package${variant.name}", PackageApplicationTask)
         packageApp.dependsOn variant.resourcePackage, dexTask
         packageApp.plugin = this
         packageApp.variant = variant
@@ -364,7 +364,7 @@ abstract class AndroidBasePlugin {
         if (signedApk) {
             if (variant.zipAlign) {
                 // Add a task to zip align application package
-                def alignApp = project.tasks.add("zipalign${variant.name}", ZipAlign)
+                def alignApp = project.tasks.add("zipalign${variant.name}", ZipAlignTask)
                 alignApp.dependsOn packageApp
                 alignApp.conventionMapping.inputFile = { packageApp.outputFile }
                 alignApp.conventionMapping.outputFile = {
@@ -377,7 +377,7 @@ abstract class AndroidBasePlugin {
             }
 
             // Add a task to install the application package
-            def installApp = project.tasks.add("install${variant.name}", InstallApplication)
+            def installApp = project.tasks.add("install${variant.name}", InstallTask)
             installApp.description = "Installs the " + variant.description
             installApp.group = "Install"
             installApp.dependsOn appTask
@@ -400,7 +400,7 @@ abstract class AndroidBasePlugin {
         assembleTask.dependsOn appTask
 
         // add an uninstall task
-        def uninstallApp = project.tasks.add("uninstall${variant.name}", UninstallApplication)
+        def uninstallApp = project.tasks.add("uninstall${variant.name}", UninstallTask)
         uninstallApp.description = "Uninstalls the " + variant.description
         uninstallApp.group = AndroidBasePlugin.INSTALL_GROUP
         uninstallApp.variant = variant
index 7c5832f..6ff815d 100644 (file)
@@ -77,7 +77,7 @@ class AndroidLibraryPlugin extends AndroidBasePlugin implements Plugin<Project>
         ProductionAppVariant variant = new ProductionAppVariant(variantConfig)
 
         // Add a task to process the manifest(s)
-        ProcessManifest processManifestTask = createProcessManifestTask(variant, DIR_BUNDLES)
+        ProcessManifestTask processManifestTask = createProcessManifestTask(variant, DIR_BUNDLES)
 
         // Add a task to create the BuildConfig class
         def generateBuildConfigTask = createBuildConfigTask(variant, null)
index 0dc5930..530a732 100644 (file)
@@ -236,7 +236,7 @@ class AndroidPlugin extends AndroidBasePlugin implements Plugin<Project> {
         def variant = new ProductionAppVariant(variantConfig)
 
         // Add a task to process the manifest(s)
-        ProcessManifest processManifestTask = createProcessManifestTask(variant, "manifests")
+        ProcessManifestTask processManifestTask = createProcessManifestTask(variant, "manifests")
 
         // Add a task to crunch resource files
         def crunchTask = createCrunchResTask(variant)
@@ -19,7 +19,7 @@ import org.gradle.api.tasks.InputFiles
 import org.gradle.api.tasks.OutputDirectory
 import org.gradle.api.tasks.TaskAction
 
-class CrunchResources extends BaseAndroidTask {
+class CrunchResourcesTask extends BaseAndroidTask {
     @OutputDirectory
     File outputDir
 
@@ -21,7 +21,7 @@ import org.gradle.api.tasks.Nested
 import org.gradle.api.tasks.OutputFile
 import org.gradle.api.tasks.TaskAction
 
-class Dex extends BaseAndroidTask {
+class DexTask extends BaseAndroidTask {
     @OutputFile
     File outputFile
 
@@ -20,7 +20,10 @@ import org.gradle.api.tasks.Input
 import org.gradle.api.tasks.InputFile
 import org.gradle.api.tasks.TaskAction
 
-class InstallApplication extends DefaultTask {
+/**
+ * Task installing an app.
+ */
+class InstallTask extends DefaultTask {
     @Input
     File sdkDir
 
@@ -22,7 +22,7 @@ import org.gradle.api.tasks.Optional
 import org.gradle.api.tasks.OutputFile
 import org.gradle.api.tasks.TaskAction
 
-class PackageApplication extends BaseAndroidTask {
+class PackageApplicationTask extends BaseAndroidTask {
     @OutputFile
     File outputFile
 
@@ -20,7 +20,7 @@ import org.gradle.api.tasks.TaskAction
 
 /**
  */
-class ProcessManifest extends BaseAndroidTask {
+class ProcessManifestTask extends BaseAndroidTask {
 
     @OutputFile
     File processedManifest
@@ -25,7 +25,7 @@ import org.gradle.api.tasks.OutputDirectory
 import org.gradle.api.tasks.OutputFile
 import org.gradle.api.tasks.TaskAction
 
-class ProcessResources extends BaseAndroidTask {
+class ProcessResourcesTask extends BaseAndroidTask {
 
     @InputFile
     File manifestFile
@@ -18,7 +18,7 @@ package com.android.build.gradle
 import org.gradle.api.tasks.Input
 import org.gradle.api.tasks.TaskAction
 
-class UninstallApplication extends BaseAndroidTask {
+class UninstallTask extends BaseAndroidTask {
     @Input
     File sdkDir
 
@@ -21,7 +21,7 @@ import org.gradle.api.tasks.InputFile
 import org.gradle.api.tasks.OutputFile
 import org.gradle.api.tasks.TaskAction
 
-class ZipAlign extends DefaultTask {
+class ZipAlignTask extends DefaultTask {
     @OutputFile
     File outputFile