Gradle.build error?

Hi,

Let me start by saying that I’m new to Gradle (I have skimmed the pdf), but that I have used Maven quite a bit, before …

The problem I’m having, is with a gradle.build file generated by a LibGDX-setup jar (so I didn’t compose it myself).

This build file generates a root-project and a couple of sub-projects (desktop, iOS, Android, …).

The projects build fine (no errors in the console window), but when I open the gradle.build file from the iOS sub-project in Netbeans8, 2 errors are visible (XMLParser & XMLNodePrinter can not be resolved) :

def config = new groovy.util.XmlParser().parse(xml)

and

def printer = new XmlNodePrinter(new PrintWriter(writer))

My first thought was that somehow the project couldn’t locate the correct jar. Then I noticed that Gradle didn’t download any jars into the project … Is this the way it should be ? And how do I go about fixing the above errors ?

I should also mention that the build-file references the Maven repository, and that I have Groovy 2.4 installed.

I have asked questions about these errors in the LibGDX-forum, but sadly didn’t get any answers … :frowning:

Thanks ! Siska.

I don’t think IDE support in Netbeans for Gradle is very good. You will likely get a lot of errors showing up when editing those files because the IDE is unaware of custom syntax rules and what is available on the build script classpath. If you Gradle build runs without error then there are no problems in any of your scripts. You can ignore any errors the IDE reports.

Oh ! That’s an interesting point you bring up. I would never have thought that it might be a NetBeans issue …

Thanks !