How to exclude bin folder from distZip?

apply plugin: ‘java’ apply plugin:‘application’

mainClassName = “RunApp”

gradlew distZip

it creates a full distribution ZIP archive with a bin folder. I want to exclude this bin folder because i have create a custom scripts in src/dist

Thanks for your help

The quickest way to achieve this is

startScripts.onlyIf {false}

Make sure you run a clean first, as you don’t want strays script from before still being packed into your zip or tar.