0

I use IntellijIdea Community 2020.1 with Gradle. I had to set "Settings > Build, Excecution, Deployment > Gradle > Build and run using = IntelliJ Idea". Because only in this case IDE initializes forms properly. But IDE does not include folder Resources in archive when I create Jar-file . I think, its because this folder places out of src directory. Now I solved this problem by adding Resources manualy in "Output layout" according the answer Intellij resources not in built artifact.

So the question is "Is there a way to include Resources in Jar by another normal easy way?"

Dmitriy
  • 487
  • 5
  • 15
  • `Build and run using = IntelliJ Idea". Because only in this case IDE initializes forms properly.` Have you tried to adjusting the build script accordingly (see [thread1](https://stackoverflow.com/questions/24185378/intellij-idea-13-ui-designer-and-automatic-gradle-building) [thread2](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206227509-How-to-make-javac2-work-in-Gradle-SOLVED-)) Then it will work with delegated to Gradle build also. – Andrey May 29 '20 at 13:06
  • `is "Is there a way to include Resources in Jar by another normal easy way?"` if you are using IntelliJ IDEA to build the jar - this is the only way. But you may consider producing the jar via the Gradle task. – Andrey May 29 '20 at 13:07
  • Andrey, thanks for participation! I've tryed "thread1". But unfortunatly, this answer does not work for me. Java source code forming only with settings "Build and run using = IntelliJ Idea" (https://youtrack.jetbrains.com/issue/IDEA-207997?_ga=2.196045548.1368897454.1590654740-184710296.1590219655&_gac=1.82906852.1590219678.CjwKCAjwk6P2BRAIEiwAfVJ0rPHPQd261t_JVaXlra_VJiqP7RJyPDLDdDiruACMCsZbpP0XIWSV_RoC-UYQAvD_BwE). With settings "Build and run using = Gradle" java source code does not create and forms aren't initialized properly as well. – Dmitriy May 29 '20 at 21:15
  • Thread2 seems more complicated for me, then solution I've used. But even if this is not so, the last comment for the post says that it does not work. But I'll try it. Thanks a lot! – Dmitriy May 29 '20 at 21:19

0 Answers0