1

I have a project, in which I automate build using gradle. I made a task's target in build.xml file:

<project basedir="." default="build" name="GGP_Base">
  <target name="SimpleServerGameDolar">
    <java classname="banan314.utilities.SimpleGameDolar" failonerror="true" fork="yes">
        <classpath refid="GGP_Base.classpath"/>
    </java>
  </target>
</project>

It worked, I ran it using gradle simpleGameDolar. But then I renamed the java class SimpleGameDolar to SimpleServerGameDolar and changed the classname in the target. And when I run it in the same way, I get the error:

Error: Could not find or load main class banan314.utilities.SimpleGameDolar :simpleGameDolar FAILED

FAILURE: Build failed with an exception.

What can I do to refresh gradle so that it knows that I changed tasks?

I tried gradle clean, gradle build and reopen IntelliJ but neither helped.

banan3'14
  • 3,810
  • 3
  • 24
  • 47
  • Out of curiosity, is there any reason you're still using an Ant `build.xml` in a Gradle build? – Oliver Charlesworth Jun 11 '17 at 15:04
  • I forked from GGP_Base project and adapted its way of build. That project was founded in 2010. It's my first use of Gradle at all. I don't know if `build.xml` is obsolete or not. I don't know how to upgrade that to another way. – banan3'14 Jun 11 '17 at 15:11

1 Answers1

0

Actually, thanks to the comment of @Oliver, I realized that build.xml has completely nothing to do with my gradle build. build.xml is in Ant build. After I changed the right file - build.gradle - it works as I expected. I was even able to delete build.xml.

banan3'14
  • 3,810
  • 3
  • 24
  • 47