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

Gradle support #10

Closed
graemerocher opened this Issue Sep 13, 2016 · 31 comments

Comments

Projects
None yet
@graemerocher

graemerocher commented Sep 13, 2016

Should detect build.gradle in addition to pom.xml

@gorkem gorkem added the enhancement label Sep 13, 2016

@gorkem

This comment has been minimized.

Show comment
Hide comment
@gorkem
Member

gorkem commented Sep 13, 2016

@fbricon fbricon added the help wanted label Sep 20, 2016

@jacek99

This comment has been minimized.

Show comment
Hide comment
@jacek99

jacek99 Sep 20, 2016

+1. Maven has been all but replaced by Gradle on any new projects that I know of. Without Gradle support, the plugin is not really usable :-/

jacek99 commented Sep 20, 2016

+1. Maven has been all but replaced by Gradle on any new projects that I know of. Without Gradle support, the plugin is not really usable :-/

@ivanz

This comment has been minimized.

Show comment
Hide comment
@ivanz

ivanz Oct 10, 2016

In case it helps someone out there (note that I am new to Java) - I was able to workaround the lack of direct Gradle support by using the 'eclipse' gradle plugin to generate an Eclipse project:

  1. Add apply plugin: 'eclipse' to your gradle file
  2. Generate the classpath/project files on the console/terminal via gradlew eclipse

Intellisense works after that.

I've also tried to use the maven plugin, but the vscode-java plugin bombs out when loading the pom-default.xml (assuming it's even trying to load it)

ivanz commented Oct 10, 2016

In case it helps someone out there (note that I am new to Java) - I was able to workaround the lack of direct Gradle support by using the 'eclipse' gradle plugin to generate an Eclipse project:

  1. Add apply plugin: 'eclipse' to your gradle file
  2. Generate the classpath/project files on the console/terminal via gradlew eclipse

Intellisense works after that.

I've also tried to use the maven plugin, but the vscode-java plugin bombs out when loading the pom-default.xml (assuming it's even trying to load it)

@netroby

This comment has been minimized.

Show comment
Hide comment
@netroby

netroby commented Oct 11, 2016

+1

@gorkem

This comment has been minimized.

Show comment
Hide comment
@gorkem

gorkem Oct 11, 2016

Member

My guess is pom-default.xml fails because we look for pom.xml files only. @fbricon can you confirm?

Member

gorkem commented Oct 11, 2016

My guess is pom-default.xml fails because we look for pom.xml files only. @fbricon can you confirm?

@fbricon

This comment has been minimized.

Show comment
Hide comment
@fbricon

fbricon Oct 11, 2016

Contributor

yes, we only look at pom.xmls

Contributor

fbricon commented Oct 11, 2016

yes, we only look at pom.xmls

@gorkem gorkem added this to the Late October 2016 milestone Oct 13, 2016

@fbricon fbricon removed this from the Late October 2016 milestone Oct 28, 2016

@tills13

This comment has been minimized.

Show comment
Hide comment
@tills13

tills13 Oct 28, 2016

This is a fairly important feature which is missing from this project - has any work been done twoards completing this?

tills13 commented Oct 28, 2016

This is a fairly important feature which is missing from this project - has any work been done twoards completing this?

@jacek99

This comment has been minimized.

Show comment
Hide comment
@jacek99

jacek99 Oct 28, 2016

Just a note: latest Gradle is focusing on Kotlin support, so it would be good if that was supported

https://blog.gradle.org/kotlin-scripting-update

jacek99 commented Oct 28, 2016

Just a note: latest Gradle is focusing on Kotlin support, so it would be good if that was supported

https://blog.gradle.org/kotlin-scripting-update

@gorkem

This comment has been minimized.

Show comment
Hide comment
@gorkem

gorkem Oct 28, 2016

Member

@tills13 I believe @fbricon did have a look at using buildship last week.

Member

gorkem commented Oct 28, 2016

@tills13 I believe @fbricon did have a look at using buildship last week.

@zhuarifp

This comment has been minimized.

Show comment
Hide comment
@zhuarifp

zhuarifp Oct 31, 2016

+1 i also need gradle support for learning libGDX in vscode. i love VSCode because lightweight but powerfull and crossplatform. the bad thing is it is still new.

zhuarifp commented Oct 31, 2016

+1 i also need gradle support for learning libGDX in vscode. i love VSCode because lightweight but powerfull and crossplatform. the bad thing is it is still new.

@scgm11

This comment has been minimized.

Show comment
Hide comment
@scgm11

scgm11 Nov 1, 2016

+1 Gradle support

scgm11 commented Nov 1, 2016

+1 Gradle support

@fbricon

This comment has been minimized.

Show comment
Hide comment
@fbricon

fbricon Nov 1, 2016

Contributor

@jacek99 we (as a 2 committers team) have no plans on providing a gradle editor for vscode, whether it's in groovy or kotlin. I believe this could be done in a 3rd party vscode plugin.

Our main objective is for gradle-based projects to be configured for java support. Basically, if you can import the gradle project in Eclipse (with Buildship), we should be able to do the same in VS Code. That said, I have no idea if kotlin is or will be supported in Buildship. If that was the case though, any changes to the build file (groovy or kotlin) should be able to trigger classpath updates (provided we add that feature).

Contributor

fbricon commented Nov 1, 2016

@jacek99 we (as a 2 committers team) have no plans on providing a gradle editor for vscode, whether it's in groovy or kotlin. I believe this could be done in a 3rd party vscode plugin.

Our main objective is for gradle-based projects to be configured for java support. Basically, if you can import the gradle project in Eclipse (with Buildship), we should be able to do the same in VS Code. That said, I have no idea if kotlin is or will be supported in Buildship. If that was the case though, any changes to the build file (groovy or kotlin) should be able to trigger classpath updates (provided we add that feature).

@gk642

This comment has been minimized.

Show comment
Hide comment
@gk642

gk642 Nov 2, 2016

+1 for Gradle support

gk642 commented Nov 2, 2016

+1 for Gradle support

@akhleung

This comment has been minimized.

Show comment
Hide comment
@akhleung

akhleung Nov 9, 2016

Hello, I work for Sourcegraph, and we're interesting in using this Java language server to power our online code analysis and browsing tools. Just wondering if there's a concrete plan/timeline for adding Gradle (and Android) support, as well as making this the de-facto standard server for supporting all Java projects -- we'd definitely be willing to help contribute, if this turns out to be the right solution for our needs!

(referencing eclipse/eclipse.jdt.ls#40, and cc-ing a couple other interested parties: @sqs @rothfels)

akhleung commented Nov 9, 2016

Hello, I work for Sourcegraph, and we're interesting in using this Java language server to power our online code analysis and browsing tools. Just wondering if there's a concrete plan/timeline for adding Gradle (and Android) support, as well as making this the de-facto standard server for supporting all Java projects -- we'd definitely be willing to help contribute, if this turns out to be the right solution for our needs!

(referencing eclipse/eclipse.jdt.ls#40, and cc-ing a couple other interested parties: @sqs @rothfels)

@gorkem

This comment has been minimized.

Show comment
Hide comment
@gorkem

gorkem Nov 9, 2016

Member

@akhleung It happens so that @fbricon is looking for volunteers to test his initial Gradle implementation. I think on a best case scenario we are looking at a Late November release. Perhaps, you can help with this work.

Can you elaborate what you mean by "the de-facto standard server for supporting all Java projects"

Member

gorkem commented Nov 9, 2016

@akhleung It happens so that @fbricon is looking for volunteers to test his initial Gradle implementation. I think on a best case scenario we are looking at a Late November release. Perhaps, you can help with this work.

Can you elaborate what you mean by "the de-facto standard server for supporting all Java projects"

@akhleung

This comment has been minimized.

Show comment
Hide comment
@akhleung

akhleung Nov 9, 2016

Great, we'd definitely be interested in helping to test Gradle support. @fbricon Is there some code we could look at, just to acquaint ourselves with the implementation (and maybe even contribute to)?

@gorkem Regarding my comment about "de facto standard", we'd ideally like a single high-quality LSP server that provides code analysis for all kinds of Java projects, whether they're using Maven, Gradle, etc. If this is on the roadmap for your project, then we'd be interested in contributing developer time to help make it happen.

akhleung commented Nov 9, 2016

Great, we'd definitely be interested in helping to test Gradle support. @fbricon Is there some code we could look at, just to acquaint ourselves with the implementation (and maybe even contribute to)?

@gorkem Regarding my comment about "de facto standard", we'd ideally like a single high-quality LSP server that provides code analysis for all kinds of Java projects, whether they're using Maven, Gradle, etc. If this is on the roadmap for your project, then we'd be interested in contributing developer time to help make it happen.

@gorkem

This comment has been minimized.

Show comment
Hide comment
@gorkem

gorkem Nov 9, 2016

Member

@akhleung We do want the java language server to be the high-quality LSP server for Java. I think we are already moving on that direction. As you are aware, this project (vscode-java) only hosts the vscode extension that uses the server. Otherwise the server project is hosted on a different repo and is going to be moved to Eclipse as a subproject of Eclipse JDT. We are waiting for the paperwork to complete for all initial contributors to complete the move.

The server is not vscode specific. Eclipse Orion project is already using it for its Java support and we are working with Eclipse Che to replace theirs. IMHO if we have cases like yours which are slightly different from a code editor it will make the implementation better.

Java is a language with many excellent choices for tools. We prefer to use existing information maintained for existing tools such as build tools to resolve our projects. We have started with Maven, for no reason but when I was doing the initial PoC development @fbricon ,who is a committer for m2e, was available to jolt start my implementation.

Member

gorkem commented Nov 9, 2016

@akhleung We do want the java language server to be the high-quality LSP server for Java. I think we are already moving on that direction. As you are aware, this project (vscode-java) only hosts the vscode extension that uses the server. Otherwise the server project is hosted on a different repo and is going to be moved to Eclipse as a subproject of Eclipse JDT. We are waiting for the paperwork to complete for all initial contributors to complete the move.

The server is not vscode specific. Eclipse Orion project is already using it for its Java support and we are working with Eclipse Che to replace theirs. IMHO if we have cases like yours which are slightly different from a code editor it will make the implementation better.

Java is a language with many excellent choices for tools. We prefer to use existing information maintained for existing tools such as build tools to resolve our projects. We have started with Maven, for no reason but when I was doing the initial PoC development @fbricon ,who is a committer for m2e, was available to jolt start my implementation.

@akhleung

This comment has been minimized.

Show comment
Hide comment
@akhleung

akhleung Nov 9, 2016

This all sounds great! Regarding the code, I've been looking through your java language server repo, but so far I haven't been able to find anything related to Gradle support, hence my asking specifically about @fbricon's contributions.

akhleung commented Nov 9, 2016

This all sounds great! Regarding the code, I've been looking through your java language server repo, but so far I haven't been able to find anything related to Gradle support, hence my asking specifically about @fbricon's contributions.

@fbricon

This comment has been minimized.

Show comment
Hide comment
@fbricon

fbricon Nov 9, 2016

Contributor

@akhleung I'll submit an initial PR later today or tomorrow

Contributor

fbricon commented Nov 9, 2016

@akhleung I'll submit an initial PR later today or tomorrow

@gorkem

This comment has been minimized.

Show comment
Hide comment
@gorkem
Member

gorkem commented Nov 11, 2016

PR is up at eclipse/eclipse.jdt.ls#97

@fbricon

This comment has been minimized.

Show comment
Hide comment
@fbricon

fbricon Nov 11, 2016

Contributor

PR is not fully functional yet. Seems to work for simple examples, but I don't have reliable results yet on real world projects. Still looking into it.

Contributor

fbricon commented Nov 11, 2016

PR is not fully functional yet. Seems to work for simple examples, but I don't have reliable results yet on real world projects. Still looking into it.

@fbricon

This comment has been minimized.

Show comment
Hide comment
@fbricon

fbricon Nov 14, 2016

Contributor

As mentioned on eclipse/eclipse.jdt.ls#40, looks like we won't be able to get android support any time soon.

If anyone can provide links to some real-world-not-android-gradle-based projects on github, I'm interested.

Contributor

fbricon commented Nov 14, 2016

As mentioned on eclipse/eclipse.jdt.ls#40, looks like we won't be able to get android support any time soon.

If anyone can provide links to some real-world-not-android-gradle-based projects on github, I'm interested.

@scgm11

This comment has been minimized.

Show comment
Hide comment
@scgm11

scgm11 Nov 15, 2016

I have some build gradle for wars and jars if interested I can share them, let me know
Im using now eclipse gradle plugin to create the files and the java support works great, anyway not having to do that would be great

scgm11 commented Nov 15, 2016

I have some build gradle for wars and jars if interested I can share them, let me know
Im using now eclipse gradle plugin to create the files and the java support works great, anyway not having to do that would be great

@fbricon

This comment has been minimized.

Show comment
Hide comment
@fbricon

fbricon Nov 15, 2016

Contributor

@scgm11 if they're available on github, let me know

Contributor

fbricon commented Nov 15, 2016

@scgm11 if they're available on github, let me know

@scgm11

This comment has been minimized.

Show comment
Hide comment
@scgm11

scgm11 Nov 15, 2016

is not an open soure project but I can provide the build.gradle if you want to check uses of gradle maybe as a gist??

scgm11 commented Nov 15, 2016

is not an open soure project but I can provide the build.gradle if you want to check uses of gradle maybe as a gist??

@fbricon

This comment has been minimized.

Show comment
Hide comment
@fbricon

fbricon Nov 15, 2016

Contributor

you can just create a dummy project with that gradle file, throw in a couple of classes referencing some of the dependencies.
I tried your fork of https://github.com/scgm11/asterisk-java, and it seems to work so far.

Contributor

fbricon commented Nov 15, 2016

you can just create a dummy project with that gradle file, throw in a couple of classes referencing some of the dependencies.
I tried your fork of https://github.com/scgm11/asterisk-java, and it seems to work so far.

@scgm11

This comment has been minimized.

Show comment
Hide comment
@scgm11

scgm11 Nov 15, 2016

ok, I'll do that in some minutes and let you know

scgm11 commented Nov 15, 2016

ok, I'll do that in some minutes and let you know

@scgm11

This comment has been minimized.

Show comment
Hide comment
@scgm11

scgm11 Nov 15, 2016

OK ready they are in my profile GradleTest1 generate a jar GradleTest2 generate a war and depends on the output build of GradleTest1, let me know if is ok or not.

thanks!

scgm11 commented Nov 15, 2016

OK ready they are in my profile GradleTest1 generate a jar GradleTest2 generate a war and depends on the output build of GradleTest1, let me know if is ok or not.

thanks!

@scgm11

This comment has been minimized.

Show comment
Hide comment
@scgm11

scgm11 Nov 18, 2016

was that useful??

scgm11 commented Nov 18, 2016

was that useful??

@gorkem gorkem added this to the Mid December 2016 milestone Dec 9, 2016

@fbricon

This comment has been minimized.

Show comment
Hide comment
@fbricon

fbricon Dec 22, 2016

Contributor

Basic Java Gradle seems to work now. However, we can't provide Android support for now, as BuildShip (that we depend on), doesn't support it.

Closing.

Contributor

fbricon commented Dec 22, 2016

Basic Java Gradle seems to work now. However, we can't provide Android support for now, as BuildShip (that we depend on), doesn't support it.

Closing.

@fbricon fbricon closed this Dec 22, 2016

@TheFanatr

This comment has been minimized.

Show comment
Hide comment
@TheFanatr

TheFanatr Sep 16, 2017

Any updates?

TheFanatr commented Sep 16, 2017

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment