stuck with "duplicate method name 'get_font'" when migrating Java swing GUI-project to gradle.
已回答
Where can i find an example of a gradle.build file that would take care of the .form files for me? I have tried specifying a custom compilation step with javac2, which seemed fine but then i get runtime issues similar to:
https://youtrack.jetbrains.com/issue/IJPL-116394/Duplicate-method-name-getFont
Do i need to include any of the IJ gradle plugins to develop comfortably with forms and gradle? I am using gradle 8.6+IJ 2023.3.4+Java 17
Please also see the SO question here:
https://stackoverflow.com/questions/78506361/how-do-i-process-intellij-form-files-when-migrating-a-project-to-gradle-build-s
Thank you!
请先登录再写评论。
Hello, Vlad!
Here's a post that might be helpful, however, it is quite old and may not be fully compatible with the recent versions of IDEA/Gradle.
I will reach out to the R&D Team for more details and will get back to you.
Thanks for your response! I have seen this post and my approach is very similar, i.e. use javac2 to build forms. It is just that when i run it (from within IntelliJ), i get this annoying duplicate method name 'get_font' runtime issue. Given that i don't have this issue when i only use gradle to build my artifact, this makes me think the issue is somewhere in the interaction of javac2 and IJ gradle plugin. There is a post: https://youtrack.jetbrains.com/issue/IJPL-116394/Duplicate-method-name-getFont that describes exactly what i see, but in the context of creating an IJ plugin. The fix for the issue has been made in a gradle plugin which has no place in my project, since i am developing a desktop application. I was trying to create a minimal code example that would reproduce this problem, but it is very hard to catch, no luck so far.
Vlad Sergeev Thank you for sharing the details!
A reproducer Project would be very much helpful in investigating and resolving this issue.
Will try and get that to you
I still haven't managed a reproducer project but there seems to be a YouTrack issue that is very relevant to the problem i am facing:
https://youtrack.jetbrains.com/issue/IDEA-223518 It looks like neither Official Maven nor Gradle plugins work well with .forms?
Vlad Sergeev I've looked into this and, unfortunately, it does seem like this cannot be achieved with the current versions of IDEA/Gradle.
The existence of the YouTrack Issue indicates that R&D Team is aware of the problem.
Upvoting and commenting the YouTrack Issue would be the best way to raise the priority of this problem for the developers.