RFR: 8335218: Eclipse Config: Remove Gradle Integration
Andy Goryachev
angorya at openjdk.org
Fri Jul 5 17:08:36 UTC 2024
On Fri, 5 Jul 2024 13:42:58 GMT, Lukasz Kostyra <lkostyra at openjdk.org> wrote:
>> This might be controversial. I am proposing to remove the Gradle integration in the Eclipse config files.
>>
>> Problem
>> =======
>> Eclipse Gradle integration (Buildship) cannot import the OpenJFX build.gradle cleanly. Every time the project is imported into a new workspace (or re-opened after being closed) it executes Gradle, creates and modifies a number of Eclipse .project and .classpath files, all of which need to be reverted for Eclipse workspace to become usable again.
>>
>> Solution
>> ======
>> Remove Gradle nature from the Eclipse project files. This change only affects Eclipse config files and does not impact build.gradle or other IDEs.
>>
>> Advantages
>> =========
>> 1. The multiple nested projects in the repo will get imported cleanly on the first attempt, will not require additional steps to clear the Buildship changes.
>> 2. completely removes the dependency on the Eclipse Buildship and its idiosyncrasies.
>>
>> NOTES:
>> - even though the reverse was done for IntelliJ, but its gradle import still does not import tests cleanly, see [JDK-8223373](https://bugs.openjdk.org/browse/JDK-8223373)
>> - this improvement contradicts [JDK-8223374](https://bugs.openjdk.org/browse/JDK-8223374) as without Eclipse files in the repo, it will be impossible to use Eclipse in a meaningful way without the fully functional Buildship support, and that is a big IF.
>> - once integrated, Eclipse users would only need to re-import the main project with 'search for nested projects' enabled
>
> +1 for this change from me.
>
> I use VS Code for development, on the marketplace most popular and recommended Java support extension is the Red Hat extension which is essentially repackaged Eclipse. It was always frustrating to try and open JFX only to find out that something doesn't load correctly because the plugin overwrote .project and .classpath files.
>
> I checked this PR and with default extension settings it loads properly. All regular features also work fine, so the plugin definitely works correctly after this PR. I only noticed that there are still modified `.project` files in `apps` directory - I wonder if it's just VS Code plugin deal, but it doesn't seem to interrupt the build process for the plugin.
@lukostyra thank you for testing! there should be no changes made to the .project or any other files. could you reset your workspace and maybe try again?
if the changes do appear, what are they?
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1491#issuecomment-2211173801
More information about the openjfx-dev
mailing list