Classfileset type in gradle

(kpramesh) #1

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.


(Dimitar Dimitrov) #2

The Gradle equivalent would be a “Configuration”.

For more info, see: Managing Dependency Configurations

(kpramesh) #3

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.

(kpramesh) #4


Anyone can help me here please ?