Comments (31)
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.
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.
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.
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.
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.
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.
@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.
Comment by donat
Friday Jan 27, 2017 at 14:16 GMT
Here's how to try it:
- Download Eclipse Neon
- 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/ - 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
- 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.
Comment by donat
Friday Jan 27, 2017 at 14:21 GMT
PR for the review: #202
from buildship.
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.
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.
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.
Hello,
Thanks for all this effort. If I can help by doing some tests...
We'll be happy (and interested to).
from buildship.
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.
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.
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.
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.
I'm getting the same results on your branch as I am the latest release candidate.
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.
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.
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.
@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.
Thanks @donat! I'll try to get some issues submitted to them.
from buildship.
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.
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.
It seems the Kotlin team is looking into this:
https://youtrack.jetbrains.com/issue/KE-273
from buildship.
@fwgreen Thanks for the update. I'm looking forward to have a stable Eclipse plugin for Kotlin.
from buildship.
@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.
Are there any updates?
from buildship.
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.
And another 3hree years gone, maybe my grandchildren will enjoy gradle kotlin dsl in eclipse :P
from buildship.
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)
- Test classes and resources of dependency are in classpath even with without_test_code=true HOT 7
- Support JDK21/gradle 8.4
- Launch Group that runs gradle task with the post launch action set to wait for termination waits infinitely
- Update site pages incorrect in the user documentation HOT 4
- deadlock during startup HOT 8
- Use preferences to decide if tabs or spaces are used in build script editor
- [Mac] After update on Eclipse version 09.2023 Splash Screen upside down HOT 2
- Kotlin Language server does not work on Windows
- The 3.1.8 release does not exist but a new release is needed for SimRel HOT 1
- Please ship org.gradle.toolingapi source jar in p2 repo
- An internal error occurred during: "Install semantic highlighting". HOT 1
- Problems building java17 projects with Buildship 3.1.8 and Eclipse 202312 HOT 5
- Importing java-library builds via "Projects from Folder or Archive" does not work correctly
- Marker Property value is too long
- Gradle tasks fail to load upon Eclipse start, manual refresh works as expected HOT 2
- 'files' dependencies should be added to the module path when applicable
- Improve Eclipse refresh time
- Finish button grayed out when importing a Gradle Project using Java 1.8,0_401
- Caused by: BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66 HOT 4
- Importing https://github.com/open-telemetry/opentelemetry-java doesn't create Eclipse projects
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buildship.