Details
-
Type:
Bug
-
Status:
Resolved
-
Resolution: Fixed
-
Affects Version/s: 0.8
-
Fix Version/s: 1.0-milestone-9
Description
I have some sh scripts that I want to package in a tar. Example tasks
using Wrapper are below. The issue is that gradlew has a+x permissions
in the directory before the tar, but when untarred it is rw-rr-.
I think the Tar task should preserve file permissions.
task wrapper(type: Wrapper) { gradleVersion = '0.8' jarPath = 'gradleWrapper' }
task testTarDist(type: Tar, dependsOn: 'wrapper') {
dirName = 'testWrapper'
tarFileSet(dir: '.') {
include('gradleWrapper/**')
include('gradlew')
include('gradlew.bat')
prefix = dirName
}
}
Adam Murdoch said:
You can use the 'filemode' attribute on tarFileSet to specify the permisions for files:
tarFileSet(dir: '.', filemode: '755') { ... }
so there is a workaround, but it seems like the default for tar should be to keep the preexisting permissions instead of defaulting to rw-rr-.
Issue Links
- Superceded by
-
GRADLE-679
Implement native archive handling
-