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 {
@Override
void apply(Project project) {
project.configure(project) {
Task taskSrcZip = project.tasks.create("makeSourceZipPlugin", MakeSourceZipTask.class)
taskSrcZip.dependsOn("build")
}
Inside my MakeSourceZipPluginTask.groovy class, I have
class MakeSourceZipTask extends Zip{
@TaskAction
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