title: Not all Gradle projects are created equal, according to Netbeans
body: <p>I'm checking whether we'd be able to migrate from Ant to Gradle, but got confused right at the very beginning of these checks - Apache Netbeans 12 LTS (+ Gradle plugin from official repo) refuses to properly open Gradle projects that were created by a another Netbeans instance, which is a major pain.</p>
  <p>I tried to open (in Netbeans) one of the Java library project <a href="https://docs.gradle.org/current/samples/sample_building_java_libraries.html" rel="nofollow noreferrer">examples</a> from Gradle docs, only to find out the IDE immediately spews out errors (missing imports for tests) that are unjustified and offers a very limited amount of IDE integration - forget running specific tests, even debugging is all grayed out. Gradle and Netbeans also see different classpaths.</p>
  <p>If I create a Gradle project inside Netbeans, everything works fine - no errors, Projects Tree shows an additional tree node, called &quot;Configurations&quot;, like in the image below, I'm able to debug and everything just works.</p>
  <p><a href="https://i.stack.imgur.com/3knQ6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3knQ6.png" alt="Project Created by Netbeans" /></a></p>
  <p>However, even if I just copy/paste this project's directory to a different location, everything breaks after the project is reopened (I also get <a href="https://issues.apache.org/jira/browse/NETBEANS-5522?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel" rel="nofollow noreferrer">this issue</a>, same thing happens for example projects found in Gradle docs).</p>
  <p><a href="https://i.stack.imgur.com/qs9a3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qs9a3.png" alt="Copy of the Project" /></a></p>
  <p>What is going on here? Netbeans seems to know more about a project it created, than about projects that were created outside it or were just relocated. How do I force it to treat all Gradle projects equally (so that they work as expected)?</p>
  <p>I used Gradle 7.0.1 and let the New Projects wizard &quot;Initialize the Gradle wrapper&quot; for the project created inside Netbeans 12 LTS. The setting to prefer existing wrappers is enabled in settings if relevant.</p>