[GRADLE-1557] target directory error when copy file in task distZip of application plugin Created: 17/May/11  Updated: 04/Jan/13  Resolved: 09/Nov/11

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-3
Fix Version/s: 1.0-milestone-4

Type: Bug
Reporter: Sky Ao Assignee: Unassigned
Resolution: Fixed Votes: 0


For distZip task in application plugin, when we want to copy more directories or files into target zip file, the target directory is error.

For example, the directory I want to copy:

+ conf
+ app.conf
+ logs
+ readme.txt

I add scripts in build.gradle:


{ from 'src/main/app' }

The generated zip file is like this:

+ conf
+ app.conf
+ logs
+ readme.txt
+ gradleDemoApp
+ lib
+ bin

Actually I want to the conf/logs/readme.txt to be together with the lib/bin directory.

The reason is that the distZip task made a new directory by the name of property applicationName and copied lib/bin to it. But not for my new added scripts

distZip { from 'src/main/app' }

I need to specific the into directory by hand to avoid error :

distZip {

{ from 'src/main/app' }


Comment by Adam Murdoch [ 09/Nov/11 ]

Have a look at http://gradle.org/releases/1.0-milestone-4/docs/userguide/application_plugin.html#application_distribution_resources

Generated at Wed Jun 30 11:58:33 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.