Announcement Announcement Module
Collapse
No announcement yet.
Importing Gradle project error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Importing Gradle project error

    Hi, I'm new to Gradle, and I need to convert an existing Java with an ant build file to Gradle. I wrote a build.gradle for it and now trying to import Gradle Project through MyEclipse with STS Gradle Integration loaded. After running Build Model, it gives the error: At least one project must be selected to import. And I don't see any project listed in the Project, Description panel.

    This a single project and the build.gradle does not have mutli-project definition in it.

    Does it need to be a multi-project for Import Gradle Project to work? Can someone tell me what I'm missing?

    Thanks!
    Ngan

  • #2
    I tested on a smaller project and it gave the same error. But when I rearranged the project into multi-project structure, rewrote the build.gradle and included settings.gradle, Importing Gradle project worked.

    Comment


    • #3
      > Does it need to be a multi-project for Import Gradle Project to work?

      Shouldn't have to be. I've worked with non-multi project samples before and had no problems.

      > I tested on a smaller project and ...

      Do you still have this small project? If you can attach a zip file and some instructions on how you try to import it I can take a look and maybe figure out why it isn't working. Could be it is a bug in the tools that I need to fix.

      Comment


      • #4
        From MyEclipse or Eclipse, File->Import->Gradle Project, hit next, browse to Root folder of the project, hit Build Model.

        How do you attach a zip file here?

        Comment


        • #5
          Sorry for the long delay in responding. Holliday break :-) Happy new year :-)

          It looks like you cannot attach zip files from the 'quick reply'. You need to click on the 'Go Advanced' button at the bottom of the quick reply. There is a way to attach files there.

          By the way, there is a sample non-multiproject project that you can try out that *should* work. At least it works for me. Maybe looking at this may help figuring out what about your sample is different that is causing trouble for the tools.

          To create the sample go to "File >> New >> Project"
          Select "Gradle Project"
          Click "Next"

          Type a name for your project like 'simple-sample'.
          Select "Java Quickstart" for "Sample Project".
          Click "Finish".

          The sample project will be created and imported.

          Comment

          Working...
          X