'How to create a non executable jar in gradle

I am a beginner in gradle , I wanted to know is there a way to create a non executable jar using gradle task.

currently I have generated the jar using ant

<target name="build-jar">
        <echo message="Creating jar"/>
         <mkdir dir="${build}"/>
         <jar destfile="${build}/lib/decouple-entity.jar"
         basedir="C:/ProjectRelated/Decouple/consumer/bin/main/com/el/export"
        includes="entity/** model/**"
        />  
</target>

Any help would be great



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source