Skip to content

Commit

Permalink
Update so plugin can be seen as a builder in the conditional build st…
Browse files Browse the repository at this point in the history
…ep plugin
  • Loading branch information
gtmacgregor committed Jul 11, 2012
1 parent 0be81ab commit 592f011
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/hudson/plugins/nant/NantBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
import hudson.model.Hudson;
import hudson.model.TaskListener;
import hudson.remoting.Callable;
import hudson.model.AbstractProject;
import hudson.tasks.Builder;
import hudson.tasks.BuildStepDescriptor;
import hudson.util.ArgumentListBuilder;
import hudson.util.FormValidation;
import hudson.util.VariableResolver;
Expand Down Expand Up @@ -190,7 +192,7 @@ public Descriptor<Builder> getDescriptor() {
* Descriptor for {@link NantBuilder}. Used as a singleton.
* The class is marked as public so that it can be accessed from views.
*/
public static final class DescriptorImpl extends Descriptor<Builder> {
public static final class DescriptorImpl extends BuildStepDescriptor<Builder> {
/**
* To persist global configuration information,
* simply store it in a field and call save().
Expand Down Expand Up @@ -225,6 +227,11 @@ public String getDisplayName() {
public NantInstallation[] getInstallations() {
return installations;
}

public boolean isApplicable(Class<? extends AbstractProject> aClass) {
// Indicates that this builder can be used with all kinds of project types
return true;
}

@Override
public boolean configure(StaplerRequest req, JSONObject formData) throws FormException{
Expand Down

0 comments on commit 592f011

Please sign in to comment.