My eclim setup working perfectly with eclipse project. But I want to use gradle build system. I am working with Libgdx framework and it provide gradle templete project. So is there any way to use eclime + eclipse + gradle
Create gradle project in eclipse and run the build. 1 1. Create java gradle project in eclipse. 2 2. Auto Generated files for Java gradle project in eclipse. 3 3. Run gradle build. 4 4. Run unit tests using gradle task. 5 5. Conclusion.
Learn about the fundamental elements of a Gradle build: projects, tasks, and the file API. If you are building software for the JVM, be sure to read about the specifics of those types of projects in Building Java & JVM projects and Testing in Java & JVM projects.
Run the task that you are interested in. Many convention-based builds integrate with Gradle’s lifecycle tasks, so use those when you don’t have something more specific you want to do with the build. For example, most builds have clean, check, assemble and build tasks.
Run gradle build In gradle tasks tab -> navigate to the project -> expand build folder -> right click on build -> Select Run Gradle tasks. 4. Run unit tests using gradle task
Your best bet is to check out the Eclipse Gradle plugin, although in short you can add apply plugin: 'eclipse'
to your project and then run gradle eclipse
from your terminal in the root folder of your project. That should generate the necessary files for Eclipse to recognize your project, although you might need to edit the .classpath file for proper autocompletions.
That will get Eclim to recognize your project with :ProjectOpen and proper autocompletion and other goodness.
The bad is that Gradle tasks and changes to your build.gradle will require manual changes to the Eclipse side of things.
Edit: There's a new plugin available for this purpose that replaces eclim for gradle projects (but is android oriented) called Vim-Grand. It's pre-alpha and you'll want the refactor branch for now, but it's working well enough for me
You should combine it with YouCompleteMe.
What I did was use the gdx-setup.jar to create my project. I then imported it into eclipse like a normal gradle project. I closed eclipse and started up elcimd. Put "let g:EclimCompletionMethod = 'omnifunc'" in my .vimrc file. Followed the elcim instructions to use :CreateProject and that was it.
This guide was really helpful: http://www.lucianofiandesio.com/vim-configuration-for-happy-java-coding
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With