Coder Social home page Coder Social logo

Comments (31)

chhex avatar chhex commented on June 8, 2024 18

I totally appreciate the great work the gradle also kotlin developers are doing. But the situation is quite frustrating for the normal users: One of the main motivations to develop gradle kotlin, was to have better IDE support for gradle. Current situation: Gradle Kotlin not usable with Eclipse, Gradle Groovy is the way better option.

from buildship.

oehme avatar oehme commented on June 8, 2024 4

but why not Gradle?

We're not in the business of building language support for IDEs ;) Plus, JetBrains is in a much better position to provide support for their own language. We hold the same position with Groovy btw.

For instance, my team decided to use Gradle because it supports both IDEs.

We do, to the extent that the IDEs allow us. We are in close contact with JetBrains and will make sure that the Kotlin scripting situation improves.

from buildship.

sdavids avatar sdavids commented on June 8, 2024 4

Any update? -- And why is this issue closed?

@oehme Your stance is understandable, but 3 years later IntelliJ is still the only IDE with proper support for Kotlin DSL.

So if Gradle Kotlin DSL is the future™️ ...

from buildship.

donat avatar donat commented on June 8, 2024 3

It's been a while since we worked on the Kotlin integration. The main functionality is there, but there were a couple of rough edges. We reported the problems to JetBrains, but so far they didn't prioritize them. Besides, the project is largely undocumented so It's really hard to contribute fixes.

In any case, we could publish the Kotlin integration as an optional, incubating feature. This way users could give us and JetBrains more feedback. @oehme WDYT?

from buildship.

donat avatar donat commented on June 8, 2024 1

I think I found the problem. Buildship is using an experimental interface from Kotlin-Eclipse which hasn't been merged into the main branch. To make it work, you should install Kotlin-Eclipse from the following update site: https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_EclipsePlugin/1079489:id/

I'll adjust the link in my post above.

from buildship.

oehme avatar oehme commented on June 8, 2024 1

We're still alive, but there is not much that Buildship actually does - all the work happens in the Kotlin Eclipse plugin. @donat gave me a nice demo some time ago which worked properly, so I'm not sure if something got broken again or if there is some difference in your setup. @donat does it still work for you?

from buildship.

calvertdw avatar calvertdw commented on June 8, 2024 1

@GFriedrich I understand why Jetbrains might not want to contribute this feature, but why not Gradle? Surely they want to decouple themselves from being an IntelliJ exclusive product. For instance, my team decided to use Gradle because it supports both IDEs.

from buildship.

donat avatar donat commented on June 8, 2024

Comment by donat
Friday Jan 27, 2017 at 14:16 GMT


Here's how to try it:

  1. Download Eclipse Neon
  2. Install the Kotlin Eclipse plugins. Select Help > Install New Software from the Eclipse menu and use the following update site: https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_EclipsePlugin/1079489:id/
  3. Install the Buildship snapshot from this update site: https://builds.gradle.org/repository/download/Tooling_Master_Eclipse_Experimental_Eclipse46withKotlinSupport/3153932:id/update-site The credentials are guest/guest
  4. Import the samples from the gradle-script-kotlin library.

What to expect:

  • Syntax highlighting, error markers, navigation, refactoring, code completion works.
  • Kotlin model accessed synchronously, therefore the UI hang a lot.
  • Javadoc hover doesn't work.

from buildship.

donat avatar donat commented on June 8, 2024

Comment by donat
Friday Jan 27, 2017 at 14:21 GMT


PR for the review: #202

from buildship.

donat avatar donat commented on June 8, 2024

Comment by oehme
Monday Jan 30, 2017 at 17:36 GMT


I gave it a first spin. I could open a Kotlin script and write some very basic stuff, yay :) However, there seem to be a lot of problems atm (or maybe my install is broken somehow):

  • it doesn't use the specified Gradle version, but a hardcoded one
  • loading the model seems pretty slow for such small projects
  • loading the model every time I open a file is making the slowness worse
  • I get lots of error markers in multi-kotlin-project-config-injection example
    • Unresolved reference: KotlinCompile
    • Expression 'plugins' of type 'PluginContainer!' cannot be invoked as a function. The function 'invoke()' is not found
    • cannot access class java.lang.Object, check your module path
    • and many more, I can do a screenshare if needed
  • auto completion is generally very slow
  • navigation to source doesn't work
  • no outline view

I didn't get further than that, since the general slowness and the many error markers make it hard to write something.

from buildship.

donat avatar donat commented on June 8, 2024

Comment by donat
Tuesday Jan 31, 2017 at 09:53 GMT


Thanks for sparing time for the evaluation. No, it's not broken, it's just a prototype :)

from buildship.

donat avatar donat commented on June 8, 2024

The Kotlin build script support is now functional (e.g. loads the correct classpath). It's time to give it another spin and see what's missing/not working.

from buildship.

Golvanig avatar Golvanig commented on June 8, 2024

Hello,
Thanks for all this effort. If I can help by doing some tests...
We'll be happy (and interested to).

from buildship.

donat avatar donat commented on June 8, 2024

Hi @Golvanig, Thanks for the offer! The timing is rather good as a blocking issue in the Kotlin tooling was resolved recently.

If you want to try the Kotlin build script support, the steps above are still up-to-date.
Please note, that the language support we extend is provided by JetBrains and it is still in the pre-1.0 stage.

If you have any feedback or need some help with the setup, feel free to ping us here.

from buildship.

Golvanig avatar Golvanig commented on June 8, 2024

Hello,

I just tried with a new clean neon.3 instance (J2EE package)
and installed the 2 plugins as described,
Imported my kotlin project (with build.gradle.kts)

OK: -- "kt" files are opened as usual
KO: -- kts can't be opened , and get an empty 'editing view' with no name
I got this issue:
"Problems occurred when invoking code from plug-in: "org.eclipse.e4.ui.workbench.swt". (detailed under)
The run with build.gradle.kts is though operational (I just have very very basic features in) through buildship or gradle command line.
Kr,


java.lang.AbstractMethodError: org.eclipse.buildship.kotlin.GradleKotlinScriptTemplateProvider.getTemplateClasspath(Ljava/util/Map;)Ljava/lang/Iterable;
at org.jetbrains.kotlin.core.model.ScriptTemplateProviderEPKt.makeScriptDefsFromEclipseTemplatesProviders(scriptTemplateProviderEP.kt:40)
...
Exception.txt

cf attachment

from buildship.

Golvanig avatar Golvanig commented on June 8, 2024

And
the icon of the kts files are still displayed with the ? question mark.
I get this error message, I think related to:

An internal error occurred during: "Compute launch button tooltip".
org.eclipse.buildship.kotlin.GradleKotlinScriptTemplateProvider.getTemplateClasspath(Ljava/util/Map;)Ljava/lang/Iterable;

from buildship.

Golvanig avatar Golvanig commented on June 8, 2024

Hello,
Thanks for the new update site.
I reloaded the new Kotlin_EclipsePlugin and I can now open the kts files.
But ...
I do not see any improvement in the syntax highlighting, the error markers, ...
for instance in
"import groovy.lang.GroovyObject"

  • import is bold
  • and "groovy" is red underlined with Unresolved reference

from buildship.

calvertdw avatar calvertdw commented on June 8, 2024

I'm getting the same results on your branch as I am the latest release candidate.

image

Gradle 4.1-rc-1
Buildship 2.1.1
Kotlin-Eclipse 0.8.2

println gets linked but the editor doesn't seem to know about KotlinBuildScript.kt

Running Gradle tasks works fine!

from buildship.

calvertdw avatar calvertdw commented on June 8, 2024

Is this project dead? Our users are flocking to IntelliJ. Should I wait on buildship to move all of our build scripts to Kotlin, or is this never gonna happen?

from buildship.

calvertdw avatar calvertdw commented on June 8, 2024

Hey @donat! I'm back... XD. Would you mind publishing that incubating version? I'd like to play around with it and see where we're at. Dying to switch our Gradle scripts to Kotlin.

from buildship.

donat avatar donat commented on June 8, 2024

@calvertdw You can install a snapshot version from this update site (credentials: guest/guest). Frankly, there's a lot of room for improvement in Kotlin-Eclipse. The tooling loads things synchronously when the editor is opened. Also, you have to open and close the editor when you apply a plugin to see proper completion. Nonetheless, if you find another problem you can report it here or at the JetBrains issue tracker.

from buildship.

calvertdw avatar calvertdw commented on June 8, 2024

Thanks @donat! I'll try to get some issues submitted to them.

from buildship.

GFriedrich avatar GFriedrich commented on June 8, 2024

Hi guys,
did you receive an update from Jetbrains in the meantime?
Because now all Kotlin Eclipse tickets vanished from their YouTrack instance.

I've also put this question into their discourse instance. Let's see what they will answer: https://discuss.kotlinlang.org/t/youtrack-kotlin-eclipse-project-gone/8161

If you've any information, it would be nice to know them.
Thanks in advance.

from buildship.

donat avatar donat commented on June 8, 2024

Not much has moved ever since. Last time I've checked the state of Kotlin-Eclipse it was still kind of unusable in production.

from buildship.

fwgreen avatar fwgreen commented on June 8, 2024

It seems the Kotlin team is looking into this:
https://youtrack.jetbrains.com/issue/KE-273

from buildship.

donat avatar donat commented on June 8, 2024

@fwgreen Thanks for the update. I'm looking forward to have a stable Eclipse plugin for Kotlin.

from buildship.

GFriedrich avatar GFriedrich commented on June 8, 2024

@fwgreen @donat I've opened this ticket a few month ago and I don't think that JetBrains is working on it (see stage "backlog"). I also don't expect that they start working on this soonish, as it's basically an unique selling point of IntelliJ IDEA to have proper Gradle Kotlin support only in this IDE. So if nobody from the "community" starts working on it, it may takes some time (or forever) until it's done.

from buildship.

scholzi100 avatar scholzi100 commented on June 8, 2024

Are there any updates?

from buildship.

donat avatar donat commented on June 8, 2024

Not really. The existing Kotlin integration in Eclipse is simply too unstable to work with Gradle DSL. We'll coordinate with JetBrains how can we improve the situation. I'll close this issue for the time being and reopen when we have an update.

from buildship.

pri-me avatar pri-me commented on June 8, 2024

And another 3hree years gone, maybe my grandchildren will enjoy gradle kotlin dsl in eclipse :P

from buildship.

sdavids avatar sdavids commented on June 8, 2024

https://blog.gradle.org/kotlin-dsl-is-now-the-default-for-new-gradle-builds

April 13, 2023
Kotlin DSL is now the default choice for new Gradle builds

from buildship.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.