Custom plugin for creating a task of type Zip

I want to create a Zip of my Source file including all the gradlew, licence, build.gradle except the .git, .iml, .idea and the build folder. I have two classes Plugin.groovy and one MakeSourceZipPluginTask.groovy. Inside Plugin.groovy,

class VCPlugin implements Plugin {

void apply(Project project) {
	project.configure(project) {
                                      Task taskSrcZip = project.tasks.create("makeSourceZipPlugin",           MakeSourceZipTask.class)

Inside my MakeSourceZipPluginTask.groovy class, I have

                 class MakeSourceZipTask extends Zip{
                 def SrcZip(){
		from ('.')
		into ('sourcezip')
		include ('*')
		//include 'LICENCE', 'README', 'NOTICE', 'gradlew*'
		exclude ('build/')
		exclude ('*.iml')

This is not working. It says UP TO DATE . Any pointers

This post is not related to Buildship. I moved it to the appropriate topic.

Hey! As far as I know, Buildship is the gradle plugin for groovy. This is exactly what I am looking for . Could you please move this back to Buildship! Thanks a lot

Buildship is the Eclipse integration for Gradle. It has nothing to do with your question.

As to your question: You are setting the inputs/outputs in the task action. This is too late for up-to-date checking, the task is already running. Move the from/into/include statements to the constructor or into the plugin (depending on which makes more sense for your use case).

Yes, That is the reason. Thank you for that answer