9

I am creating a zip file using the gradle distribution plugin:

distributions {
    installer {
        baseName 'installer'
        contents {
            from 'src/main/installer'
        }
    }
}

Inside the zip the files are put into a folder called <basename>-<version> e.g. installer-0.2.1-SNAPSHOT, I want them to be put directly in the root of the zip, is that possible?

npeder
  • 788
  • 10
  • 26
  • 1
    AFAIK, creation of the root folder with the default name of the archive for the distribution plugin is hard coded and can't be modified. But you can create your own task with type `Zip` and make the distribution archive with it. – Stanislav Nov 19 '15 at 09:49
  • 2
    Is there somewhere to make a feature request to have this ridiculous "feature" changed? Why would the distributions plugin add a leading folder? Makes no sense, that isn't how I want the application to be deployed on my server. – Michael Nov 20 '15 at 18:26
  • 1
    See http://stackoverflow.com/questions/24496576/gradle-distribution-task-output-files-not-at-root-of-zip for an answer. – Mirko Seifert May 18 '16 at 12:07

0 Answers0