-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have run configurations and tests use Gradle #1235
Comments
I'm also working in a project environment where the applications only successfully launch when executed with Gradle. (though compilation is successful either way) This is not a problem for IntelliJ IDEA because there it is actually the default behavior to run and test using the build tool in Gradle projects (not changeable in the community edition). Therefore I guess the solution would be to add a new setting to delegate build/run actions to Gradle which should also help with mixed source (Java/Groovy/Kotlin) projects. |
This gets my vote. This would be the last detail making me switch to VS Code for Gradle project development |
To clarify, is this to support a gradle launch configuration in launch.json? |
@Spitfire1900 I won't speak for the rest, but I would assume so. It would be helpful to have a launch type for gradle so one could, say, launch and kill a gradle run, perhaps also attaching a debugger. In my case I am running bnd and an OSGi service. I end up having to setup a |
We support test delegation now. See microsoft/vscode-java-test#1045 (comment). Please let me know if you this meet your requirements. |
That's actually not exactly what I needed, but that is good to know! In my case I run a web server through OSGi. Specifically I am using Bnd. It is often helpful when running that web server to set breakpoints to debug the launch of my application. I would say that of the title of the issue "Have run configurations and tests use Gradle" the latter has been absolutely completed, but the former may not be complete, if that's what the original author meant be "run configurations". |
Oh, I do see that I can use a Thanks @jdneo ! |
Is your feature request related to a problem? Please describe.
I have a project that uses Gradle. The only way to successfully compile and run it is through Gradle. It would be better if the run configurations and tests would leverage Gradle. As it stands, I do not see a way to run individual tests when your project depends on Gradle other than via the command line.
The current alternative is to use the Gradle extension's task UI. You can choose to run or debug a task, or run it with command line args. This is fine for running pre-made tasks, but clumsy for running tests, and the task UI provides no customization options you can reuse. It also is not intuitive to anyone who is not familiar with Gradle or java projects, and are expecting the project to work like it would in any other language, since it requires ignoring the existing run and test features.
Describe the solution you'd like
We can create Gradle run configurations and also define test behavior. Note, also, different test directories in the same project may have different Gradle tasks. It's also worth calling out that Gradle supports watching file changes, which may be a useful mechanism for automatically running tests.
Describe alternatives you've considered
None.
Other info
The project defines class paths and does not appear to be misconfigured in any obvious way.
The text was updated successfully, but these errors were encountered: