Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refactor tasks and plugins to be compilable with gradle 0.9 snapshot

  • Loading branch information...
commit 93f555b32e3c8c4e8274a3dd3dee7453961375e6 1 parent f6e6ffa
Rene Groeschke authored
Showing with 60 additions and 111 deletions.
  1. BIN  pdePlugin/.gradle/cache/build.gradle/build_gradle$_run_closure1.class
  2. BIN  pdePlugin/.gradle/cache/build.gradle/build_gradle$_run_closure2.class
  3. BIN  pdePlugin/.gradle/cache/build.gradle/build_gradle.class
  4. +0 −3  pdePlugin/.gradle/cache/build.gradle/cache.properties
  5. +2 −4 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/FeaturePdeBuild.java
  6. +2 −4 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/ProductPdeBuild.java
  7. +4 −1 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/CommonTask.java
  8. +8 −12 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/feature/CleanFeatureTask.java
  9. +4 −9 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/feature/DeployFeatureTask.java
  10. +4 −8 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/feature/InitFeatureTask.java
  11. +5 −10 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/feature/PdeFeatureTask.java
  12. +4 −9 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/feature/ResourceFeatureTask.java
  13. +5 −9 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/product/CleanProductTask.java
  14. +8 −13 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/product/DeployProductTask.java
  15. +4 −9 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/product/InitProductTask.java
  16. +6 −10 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/product/PdeProductTask.java
  17. +4 −10 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/product/ResourceProductTask.java
View
BIN  pdePlugin/.gradle/cache/build.gradle/build_gradle$_run_closure1.class
Binary file not shown
View
BIN  pdePlugin/.gradle/cache/build.gradle/build_gradle$_run_closure2.class
Binary file not shown
View
BIN  pdePlugin/.gradle/cache/build.gradle/build_gradle.class
Binary file not shown
View
3  pdePlugin/.gradle/cache/build.gradle/cache.properties
@@ -1,3 +0,0 @@
-#Wed Jul 01 23:45:14 CEST 2009
-version=0.6.1
-hash=4538a80eb22b55a3d7a7402f1919f1b6
View
6 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/FeaturePdeBuild.java
@@ -30,8 +30,6 @@
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.plugins.Convention;
-import org.gradle.api.plugins.ProjectPluginsContainer;
-
import com.thalesgroup.gradle.pde.tasks.feature.CleanFeatureTask;
import com.thalesgroup.gradle.pde.tasks.feature.DeployFeatureTask;
import com.thalesgroup.gradle.pde.tasks.feature.InitFeatureTask;
@@ -40,7 +38,7 @@
-public class FeaturePdeBuild implements Plugin {
+public class FeaturePdeBuild implements Plugin<Project>{
public static final String CLEAN_TASK_NAME = "clean";
public static final String INIT_TASK_NAME = "init";
@@ -48,7 +46,7 @@
public static final String PDE_BUILD_TASK_NAME = "pdeBuild";
public static final String DEPLOY_TASK_NAME = "deploy";
- public void use(Project project, ProjectPluginsContainer container) {
+ public void use(final Project project) {
HashMap<String, ?> customValues = new HashMap<String,String>();
FeaturePdeConvention featurePdeConvention = new FeaturePdeConvention(project, customValues);
Convention convention = project.getConvention();
View
6 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/ProductPdeBuild.java
@@ -30,7 +30,6 @@
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.plugins.Convention;
-import org.gradle.api.plugins.ProjectPluginsContainer;
import com.thalesgroup.gradle.pde.tasks.product.CleanProductTask;
import com.thalesgroup.gradle.pde.tasks.product.DeployProductTask;
@@ -40,7 +39,7 @@
-public class ProductPdeBuild implements Plugin {
+public class ProductPdeBuild implements Plugin<Project> {
public static final String CLEAN_TASK_NAME = "clean";
public static final String INIT_TASK_NAME = "init";
@@ -48,8 +47,7 @@
public static final String PDE_BUILD_TASK_NAME = "pdeBuild";
public static final String DEPLOY_TASK_NAME = "deploy";
-
- public void use(Project project, ProjectPluginsContainer container) {
+ public void use(final Project project) {
HashMap<String, String> customValues = new HashMap<String,String>();
//project.setProperty("notification", config);
View
5 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/CommonTask.java
@@ -25,6 +25,7 @@
import java.util.Map;
+import org.gradle.api.Project;
import org.gradle.api.internal.ConventionTask;
import org.gradle.api.plugins.Convention;
@@ -34,9 +35,11 @@
public class CommonTask extends ConventionTask {
private Map<String, ?> customValues;
+ protected final Project project;
- public CommonTask() {
+ public CommonTask(final Project project) {
super();
+ this.project = project;
}
public void setCustomValues(Map<String, ?> customValues){
View
20 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/feature/CleanFeatureTask.java
@@ -25,10 +25,10 @@
import org.gradle.api.Project;
import org.gradle.api.Task;
-import org.gradle.api.TaskAction;
+import org.gradle.api.tasks.TaskAction;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
import com.thalesgroup.gradle.pde.FeaturePdeConvention;
import com.thalesgroup.gradle.pde.tasks.AntPdeClean;
import com.thalesgroup.gradle.pde.tasks.CommonTask;
@@ -36,17 +36,13 @@
public class CleanFeatureTask extends CommonTask {
private static Logger logger = LoggerFactory.getLogger(CleanFeatureTask.class);
+
+ public CleanFeatureTask(final Project project, String name) {
+ super(project);
+ }
- public CleanFeatureTask(final Project project, String name) {
- super();
- doFirst(new TaskAction() {
- public void execute(Task task) {
- generate(project, task);
- }
- });
- }
-
- protected void generate(final Project project,Task task) {
+ @TaskAction
+ protected void generate() {
FeaturePdeConvention featurePdeConvention = featurePde(project.getConvention());
new AntPdeClean().execute(featurePdeConvention.getBuildDirectory(),getAnt());
}
View
13 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/feature/DeployFeatureTask.java
@@ -26,7 +26,7 @@
import org.gradle.api.*;
-import org.gradle.api.tasks.util.ExistingDirsFilter;
+import org.gradle.api.tasks.TaskAction;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
@@ -42,16 +42,11 @@
public DeployFeatureTask(final Project project, String name) {
- super();
-// setActions(new ArrayList<TaskAction>());
- doFirst(new TaskAction() {
- public void execute(Task task) {
- generate(project, task);
- }
- });
+ super(project);
}
- protected void generate(Project project, Task task) {
+ @TaskAction
+ protected void generate() {
FeaturePdeConvention featurePdeConvention = featurePde(project.getConvention());
View
12 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/feature/InitFeatureTask.java
@@ -26,9 +26,9 @@
import org.gradle.api.Project;
import org.gradle.api.Task;
-import org.gradle.api.TaskAction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.gradle.api.tasks.TaskAction;
import com.thalesgroup.gradle.pde.FeaturePdeConvention;
import com.thalesgroup.gradle.pde.tasks.AntPdeInit;
@@ -40,15 +40,11 @@
private static Logger logger = LoggerFactory.getLogger(InitFeatureTask.class);
public InitFeatureTask(final Project project, String name) {
- super();
- doFirst(new TaskAction() {
- public void execute(Task task) {
- generate(project,task);
- }
- });
+ super(project);
}
- protected void generate(final Project project,Task task) {
+ @TaskAction
+ protected void generate() {
FeaturePdeConvention featurePdeConvention = featurePde(project.getConvention());
View
15 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/feature/PdeFeatureTask.java
@@ -24,9 +24,9 @@
package com.thalesgroup.gradle.pde.tasks.feature;
+import org.gradle.api.tasks.TaskAction;
import org.gradle.api.*;
-import org.gradle.api.tasks.util.ExistingDirsFilter;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
@@ -41,16 +41,11 @@
private static Logger logger = LoggerFactory.getLogger(PdeFeatureTask.class);
public PdeFeatureTask(final Project project, String name) {
- super();
-// setActions(new ArrayList<TaskAction>());
- doFirst(new TaskAction() {
- public void execute(Task task) {
- generate(project, task);
- }
- });
+ super(project);
}
-
- protected void generate(Project project, Task task) {
+
+ @TaskAction
+ protected void generate() {
FeaturePdeConvention featurePdeConvention = featurePde(project.getConvention());
View
13 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/feature/ResourceFeatureTask.java
@@ -26,8 +26,8 @@
import org.gradle.api.*;
+import org.gradle.api.tasks.TaskAction;
-import org.gradle.api.tasks.util.ExistingDirsFilter;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
@@ -41,16 +41,11 @@
private static Logger logger = LoggerFactory.getLogger(ResourceFeatureTask.class);
public ResourceFeatureTask(final Project project, String name) {
- super();
- //setActions(new ArrayList<TaskAction>());
- doFirst(new TaskAction() {
- public void execute(Task task) {
- generate(project, task);
- }
- });
+ super(project);
}
- protected void generate(Project project, Task task) {
+ @TaskAction
+ protected void generate() {
FeaturePdeConvention featurePdeConvention = featurePde(project.getConvention());
System.out.println("generate ResourceFeatureTask");
View
14 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/product/CleanProductTask.java
@@ -27,7 +27,7 @@
import org.gradle.api.Project;
import org.gradle.api.Task;
-import org.gradle.api.TaskAction;
+import org.gradle.api.tasks.TaskAction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -40,15 +40,11 @@
private static Logger logger = LoggerFactory.getLogger(CleanProductTask.class);
public CleanProductTask(final Project project, String name) {
- super();
- doFirst(new TaskAction() {
- public void execute(Task task) {
- generate(project,task);
- }
- });
+ super(project);
}
-
- protected void generate(final Project project,Task task) {
+
+ @TaskAction
+ protected void generate() {
ProductPdeConvention productPdeConvention = productPde(project.getConvention());
new AntPdeClean().execute(productPdeConvention.getBuildDirectory(),getAnt());
}
View
21 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/product/DeployProductTask.java
@@ -24,7 +24,7 @@
package com.thalesgroup.gradle.pde.tasks.product;
import org.gradle.api.*;
-import org.gradle.api.tasks.util.ExistingDirsFilter;
+import org.gradle.api.tasks.TaskAction;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
@@ -41,24 +41,19 @@
public DeployProductTask(final Project project, String name) {
- super();
-// setActions(new ArrayList<TaskAction>());
- doFirst(new TaskAction() {
- public void execute(Task task) {
- generate(project, task);
- }
- });
+ super(project);
}
- protected void generate(Project project, Task task) {
+ @TaskAction
+ protected void generate() {
ProductPdeConvention productPdeConvention = productPde(project.getConvention());
new AntProductDeploy().execute(
- productPdeConvention.getBuildId(),
- productPdeConvention.getBuildDirectory(),
- productPdeConvention.getPublishDirectory(),
- getAnt());
+ productPdeConvention.getBuildId(),
+ productPdeConvention.getBuildDirectory(),
+ productPdeConvention.getPublishDirectory(),
+ getAnt());
}
}
View
13 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/product/InitProductTask.java
@@ -27,7 +27,7 @@
import org.gradle.api.Project;
import org.gradle.api.Task;
-import org.gradle.api.TaskAction;
+import org.gradle.api.tasks.TaskAction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -40,16 +40,11 @@
private static Logger logger = LoggerFactory.getLogger(InitProductTask.class);
public InitProductTask(final Project project, String name) {
- super();
-// setActions(new ArrayList<TaskAction>());
- doFirst(new TaskAction() {
- public void execute(Task task) {
- generate(project,task);
- }
- });
+ super(project);
}
- protected void generate(final Project project,Task task) {
+ @TaskAction
+ protected void generate() {
ProductPdeConvention productPdeConvention = productPde(project.getConvention());
View
16 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/product/PdeProductTask.java
@@ -25,7 +25,8 @@
import org.gradle.api.*;
-import org.gradle.api.tasks.util.ExistingDirsFilter;
+import org.gradle.api.tasks.TaskAction;
+
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
@@ -40,16 +41,11 @@
private static Logger logger = LoggerFactory.getLogger(PdeProductTask.class);
public PdeProductTask(final Project project, String name) {
- super();
- //setActions(new ArrayList<TaskAction>());
- doFirst(new TaskAction() {
- public void execute(Task task) {
- generate(project, task);
- }
- });
+ super(project);
}
-
- protected void generate(Project project, Task task) {
+
+ @TaskAction
+ protected void generate() {
ProductPdeConvention productPdeConvention = productPde(project.getConvention());
View
14 pdePlugin/src/main/groovy/com/thalesgroup/gradle/pde/tasks/product/ResourceProductTask.java
@@ -24,10 +24,9 @@
package com.thalesgroup.gradle.pde.tasks.product;
-
import org.gradle.api.Project;
import org.gradle.api.Task;
-import org.gradle.api.TaskAction;
+import org.gradle.api.tasks.TaskAction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -39,16 +38,11 @@
private static Logger logger = LoggerFactory.getLogger(ResourceProductTask.class);
public ResourceProductTask(final Project project, String name) {
- super();
-// setActions(new ArrayList<TaskAction>());
- doFirst(new TaskAction() {
- public void execute(Task task) {
- generate(project, task);
- }
- });
+ super(project);
}
- protected void generate(Project project, Task task) {
+ @TaskAction
+ protected void generate() {
ProductPdeConvention productPdeConvention = productPde(project.getConvention());
Please sign in to comment.
Something went wrong with that request. Please try again.