Eclipse and Gradle in OpenJFX
Nir Lisker
nlisker at gmail.com
Wed Jun 19 00:29:29 UTC 2024
It has been a while since I tried a clean import of jfx, but the
instructions in
https://wiki.openjdk.org/display/OpenJFX/Using+an+IDE#UsinganIDE-UsingEclipse
seem correct, unless something changed. What you describe is written there.
Only the initial import requires a gradle build, and after reverting the
project and classpath changes, you can work with ECJ (unless you need tasks
to build native code etc.)
What is worth looking at is the 'eclipse' gradle task that tries to
generate these files according to the gradle files. However, the way the
project is built in gradle is both complicated and very old (compliant with
gradle 2 I think), so I don't know how well that will work. In my modern
projects, the 'eclipse' task works really well and allows me to not check
in the eclipse files: a gradle refresh/synch is run once (does all the
configuration and dependency management), and then running 'eclipse' once
sets up the eclipse side.
On Tue, Jun 18, 2024 at 10:52 PM Thiago Milczarek Sayão <
thiago.sayao at gmail.com> wrote:
> Andy,
>
> We kind of did the opposite for Intellij (got rid of the .iml files and
> went for gradle import):
>
> https://github.com/openjdk/jfx/pull/1009
>
> I couldn't get it to detect the manual tests tho. Changing some gradle
> files worked, but would require a deeper review, so we went without it.
>
> -- Thiago.
>
> Em ter., 18 de jun. de 2024 às 16:05, Andy Goryachev <
> andy.goryachev at oracle.com> escreveu:
>
>> Dear developers:
>>
>>
>>
>> Does anyone use gradle in Eclipse (Buildship plug-in) with the OpenJFX
>> repo?
>>
>>
>>
>> The reason I am asking is that in my experience, the gradle nature in
>> OpenJFX is either misconfigured, or obsolete, or both. There is a rather
>> old wiki page [0] which describes the Eclipse setup, though I don't think
>> it is correct anymore. The initial import of the repository in Eclipse
>> triggers an internal gradle run which creates/modifies a bunch of
>> .classpath and .project files which must be undone before the workspace
>> becomes usable. In any case, only a proper command line gradle build is
>> supported anyway.
>>
>>
>>
>> I would like to propose removing the gradle nature from Eclipse's
>> .project files in OpenJFX. Once done, the projects can be trivially
>> imported into a new workspace with no extra steps required. This change
>> has no impact on command line build whatsoever.
>>
>>
>>
>> What do you think?
>>
>>
>>
>> Thank you
>>
>> -andy
>>
>>
>>
>>
>>
>>
>>
>> *References*
>>
>>
>>
>> [1]
>> https://wiki.openjdk.org/display/OpenJFX/Using+an+IDE#UsinganIDE-ConfigureEclipsetousethelatestJDK
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240619/113357ab/attachment.htm>
More information about the openjfx-dev
mailing list