Table of Contents

About

The file api of gradle to execute file system operations is detailled in this page

Note

File Permission chmod

You need to be cautious when setting the file permission because the value expected is in base 10 and not in base 8 (which is the standard)

Example when copying file into a distribution (ie archive).

into("/bin") {
        from("${buildDir}/scripts") {
          fileMode = Integer.parseInt("755", 8) // or 493 which is 755 base 8 in base 10
          dirMode = Integer.parseInt("750", 8)
        }
}