0

I'm using LibGDX. Gradle is letting me compile and run my project just fine. However, when I try to run extra gradle tasks (In my case building a Jar) it fails without any errors in my IDE. Whatever the task I select (from my 3 modules, MyGame, core and desktop) I always get the same output.

Task failing

The biggest issue is I can't find any warning or errors anywhere on my IDE and I'm not experienced enough with gradle to know where are the output logs. Maybe it's just my IDE's fault ? I tried reloading the gradle project and restarting IntelliJ with no success.

So, about the no-errors thing. When I go in View > Tool windows > Run, IntelliJ is showing me I'm currently on it. So the image I sent was the run menu (even though normally I have my program output in that). And I go nothing useful in my Event Log.

Using IntelliJ IDEA Ultimate 2016.1.3

EDIT

Thanks to John who told me how to use gradle in command line, I got the error now. I executed the command gradlew desktop:run and got

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:compileJava'.
> Could not find tools.jar

So what is tools.jar ? How do I find it and where do I put it ?

Winter
  • 3,894
  • 7
  • 24
  • 56
  • Have you tried running it from the command line? – John Jan 05 '17 at 03:26
  • @John No, I have no experience with gradle outside LibGDX. And I'm on windows, I'm pretty sure gradle isn't added to the executables path so I have no idea where the executable is or what command to run. If you can enlight me, that would be awesome. – Winter Jan 05 '17 at 03:35
  • 2
    Yeah, if you used the libGDX installer, it will include a gradle wrapper (gradlew) in your project directory. If you open a command line in the same directory as your root gradle file, you should be able to run your application using `gradlew desktop:run` and `gradlew desktop:dist` to generate the jar. – John Jan 05 '17 at 04:51

0 Answers0