title: How to use something similar to fileset and pathconvert of ant in Gradle
body: <p>I am trying to convert an Ant project to Gradle. 
  One target is executing a Java Main class. And list of java files are passed into the Main class as argument. </p>
  
  <p>Ant Code :</p>
  
  <pre><code>&lt;target name="someThing"&gt;
          &lt;fileset dir="src/main/java" id="input.files"&gt;
              &lt;include name="**/api/SomeApi.java"/&gt;
              &lt;include name="**/temporaryuserdata/api/Some2API.java"/&gt;
          &lt;/fileset&gt;
          &lt;pathconvert pathsep=" " property="javaFiles" refid="input.files"/&gt;
          &lt;java classname="com.some.tool.MainClass" classpathref="buildtools.classpath" fork="true" failonerror="true"&gt;
              &lt;arg value="${javaFiles}"/&gt;
          &lt;/java&gt;
      &lt;/target&gt;
  </code></pre>
  
  <p>I converted it to gradle using the ant support in gradle in following way: 
  Gradle Code: </p>
  
  <pre><code>task someThing(type: JavaExec) {
      classpath = sourceSets.main.runtimeClasspath
      main = 'com.some.tool.MainClass'
      ant.fileset(dir : '', id: 'input.files'){
          include(name : "**/api/SomeApi.java")
          include(name : "**/api/Some2API.java")
      }
      ant.pathconvert(pathsep : " ", refid: "input.files", property: "javaFiles")
      args = [ant.properties["javaFiles"]]
  }
  </code></pre>
  
  <p>It works as expected. However, I don't want to use the ant things in gradle. </p>
  
  <p><strong>Can somebody help me get the same output of fileset and pathconvert using the proper gradle and groovy tools?</strong> </p>