Protect zip or tar with password

Hello,

I would like to know if it’s possible to add a password to a package. I wrote a script that creates a tar (with ant.tar) for the client and then add it to a zip (with ant.zip) containing the documentation. I would like to protect the zip (and the tar if possible) with a password.

Thanks

I thought I can set the password thought the command line, with the “commandLine” command, passing zipcloak.

It works, but I need to enter 2 times the password I want to give to the zip, and in this case I receive the following error:

14:43:29.333 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
14:43:29.334 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: command ‘passorwSet’.
14:43:29.337 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED

I finally did this: commandLine and request of arguments