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.

Regards
Ramesh


(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/**/*" />
        </patternset>

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


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

Basically the above generates a jar file in ant?

How can I represent this in a gradle ?

classfileset documentation
https://ant.apache.org/manual/Types/classfileset.html

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


(kpramesh) #4

Hi

Anyone can help me here please ?