facebook

How to import gradle project properly.?

  1. MyEclipse IDE
  2.  > 
  3. General Development

Tagged: , ,

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #695805 Reply

    priyanka.worldline
    Participant

    I used to clone gradle project and imported it in to myeclipse.
    But its not works as expected. not identifying Java8+ features when it imported.
    Please advise me on that. (but same project works well in IntellJ. we do only gradle and java version configs there)

    Also, one thing to know that, If I’m using paid version of MyEclipse.,
    your team help me to resolve issues using screen sharing sessions.? (zoom or Teams etc.)

    Thanks

    #695807 Reply

    support-swapna
    Moderator

    Priyanka,

    The latest MyEclipse 2022 integrates Gradle 3.1.5 version. Is that the same version you are using in IntelliJ?
    Please share the sample project along with the error details to help us investigate further. If you are working with an older version of MyEclipse, then share the version details from Help > About MyEclipse dialog.

    We provide support via forums and ticketing system only.

    Do let us know if you have any further questions.

    –Swapna
    Genuitec Support

    #695810 Reply

    priyanka.worldline
    Participant

    Hi Swapna,
    Thanks for your prompt response
    Please refer to the attached file
    I included settings and error msg in there
    Thanks

    Attachments:
    You must be logged in to view attached files.
    #695842 Reply

    support-swapna
    Moderator

    Priyanka,

    Thank you for the details.
    Can you please try the below steps and see if it helps? :

    1. Start MyEclipse with completely new workspace
    2. In Gradle preference page (Window -> Preferences -> Gradle) Set “Java home” to your JDK location and “Specific Gradle version” to the desired version, apply changes, please do not use “Wrapper” option.
    3. Try to import existing project via wizard as before (do not override workspace settings).

    If you are still seeing issues, then please share the sample project and the contents of the build.gradle file to help us replicate the issue at our end.

    –Swapna
    Genuitec Support

    #695844 Reply

    priyanka.worldline
    Participant

    Thanks Swapna for your reply. I followed your mention steps.
    now its imported to myEclipse workspace but shows as folders [instead of source folders]
    so how can I resolve that issue then.?

    Thanks again

    Attachments:
    You must be logged in to view attached files.
    #695887 Reply

    support-swapna
    Moderator

    Priyanka,

    Apologies for the delayed response. I ran few tests with sample Gradle projects and do not see the reported issue if I specify a java home in the Import wizard as shown in the attached screenshot.

    Can you please clarify if you have specified the Java home while importing your project? Please share the Import wizard screenshot and the sample project to help us investigate further.

    –Swapna
    Genuitec Support

    Attachments:
    You must be logged in to view attached files.
    #695889 Reply

    priyanka.worldline
    Participant

    Hi Swapna,
    Thanks for your reply as well as your effort on reproducing this issue.
    I’ve attached myEclipse gradle configs here. (only change that I’ve given JAVA_HOME without /bin.
    because if I give it with /bin it gives me an error)

    Thanks again

    Attachments:
    You must be logged in to view attached files.
    #695896 Reply

    support-swapna
    Moderator

    Priyanka,

    Thank you for the screenshot. Please switch to a new workspace, New > Import > Gradle > Existing Gradle Project > select ‘Override workspace settings’, choose the correct Gradle version for ‘Specific Gradle version’, set the Java home and proceed with the import. This should fix the problem with the source folders.

    Do let us know how this works for you.

    –Swapna
    Genuitec Support

    #695900 Reply

    priyanka.worldline
    Participant

    Thanks for your prompt response Swapna.
    Unfortunately its not working yet.
    (That is strange because in intellij its working after just open the project.)

    But as a eclipse fan, I’m not familiar with that IDE.
    So, I’m handling this issue like this.

    1. clone project
    2. ./gradlew clean install (via console) >> to generate required jar files
    3. ./gradlew eclipse
    4. import >> project from Git
    5. manually configure buildpath (add dependencies as a external jars, which I generated in Step #2)

    then it works as a normal java project without any errors.
    Thanks again

    #695909 Reply

    support-swapna
    Moderator

    Priyanka,

    Thank you for sharing the steps you followed.
    Here is some explanation for why ‘gradlew eclipse’ command should be executed to resolve dependencies in Eclipse : https://stackoverflow.com/questions/38171471/eclipse-not-recognizing-gradle-dependencies

    –Swapna
    Genuitec Support

    #695911 Reply

    priyanka.worldline
    Participant

    Noted with Thanks Swapna.!

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: How to import gradle project properly.?

You must be logged in to post in the forum log in