Gradle and Buidship not working for Vaadin project

Dear forum,

I am trying to search help for a problem about Visual Studio Code (which use Buildship), Gradle and a software called Vaadin.
I have downloaded the example application for using Vaadin and Jetty from here: vaadin14-embedded-jetty-gradle
The application is a simple app which use Jetty launching it in embedded and configuring jetty to load the Vaadin Servlet.
The Vaadin servlet look in the classpath if there are some class annotated with the @route annotation and add these found servlet too inside Jetty.

If you try to download the app and run it with gradle with gradle appRun everything works fine, if I try to use the VSC debug feature with it’s launch.json file and gradle integration based on BuildShip the annotated servlet couldn’t be found.
The suspect as indicated here: Vaadin Buildship problem is that in some way the directory build\classes\java\main is not correctly included in the classpath.

Could some gradle and buildship expert help in some way?

Is there a way to add the directory in the classpath?

Regards,
Stefano Bossi

Buildship assigns a separate classpath to the project because the Java tooling in Eclipse breaks when the class file disappears (the clean task is executed). You can assign the build/classes/java/main class to the classspath in the eclipse.classpath.file.whenMerged block. You’ll find examples for that too: Buildship 1.0.18 is now available
I’d also add the compileJava task to the `` to the synchronization tasks to keep the IDE up-to-date.

Thanks a lot !!!
Your suggestions solved my problem.
I have added this little code here to my gradle build file and now the Vaadin application works as expected:

eclipse {
    classpath {
        file {
            whenMerged {
                def src = entries.find { it.path == 'src/main/java' }
                src.output = "/$eclipse.project.name/classes/main-java"
            }
        }
    }
}

Thanks again for your help,
S.