Classfileset type in gradle

Hi All,

Is there any equivalent for ant classfileset type in gradle or can anyone please provide with an example on how to use classfileset while building a jar file in gradle.


The Gradle equivalent would be a “Configuration”.

For more info, see: Managing Dependency Configurations

I must have included an example

I have the following ant file

       <patternset id="patternset.webstart.core">
            <include name="com/ramesh/co/apps/imc/*" />
            <include name="com/ramesh/co/apps/imc/admin/**/*" />
            <include name="com/ramesh/co/apps/imc/applet/**/*" />

  <classfileset dir="build/classes/client" id="webstart.classes.core">
            <rootfileset dir="build/classes/client">
                <patternset refid="patternset.webstart.core" />

<jar jarfile="${}/core/test.jar">
            <fileset refid="webstart.classes.core" />

Basically the above generates a jar file in ant?

How can I represent this in a gradle ?

classfileset documentation

ClassFileSet --> causes all dependent class to be included in the jar file.


Anyone can help me here please ?