My gradle build is fine, but in intellij what is d...
# kvision
j
My gradle build is fine, but in intellij what is defined in sourceSets["main"].dependencies {} does not show up under External Libraries. Is there a recommended way to sync?
r
Sometimes just reloading the project is enough to fix such problems (Gradle -> Reload Gradle Project)
If not, you can remove
.idea
folder and re-import the project.
j
I'll try (again) ...
... main and test dir's are not identified automatically ...
... after marking main/kotlin, main/resources, test/kotlin, test/resources I get: "Kotlin not configured" (I've beeen here a couple of times yet) ...
r
You have pom.xml in there, maybe the project is detected as maven ?
j
Yeah - could be, but until recently, it was not a problem. And there was a dialogbox on re-importing, if the project should be handled as gradle project.
r
Can I checkout the current sources?
j
What is a bit funny is, as soon as I press The Gradle reload button, directory types (source, resources for both main and test) seem to be removed.
I'commit my current state and post the link - wait a couple minutes.
+ thanks for your constant willingness to help, I really appreciate it!
maybe
sourceSets["main"].dependencies
isn't honored by (my version) of intellij?
r
Works for me without any problems.
Have you tried invalidating intellij cache ?
j
a couple of times
I'm at: IntelliJ IDEA 2021.3.2 (Ultimate Edition) Build #IU-213.6777.52, built on January 28, 2022 Licensed to Kuehne + Nagel (AG & Co.) KG Runtime version: 11.0.13+7-b1751.25 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 8196M Cores: 8 Registry: debugger.watches.in.variables=false ide.images.show.chessboard=true Non-Bundled Plugins: ski.chrzanow.foldableprojectview (1.1.1) com.intellij.ideolog (203.0.27.0) org.jetbrains.kotlin (213-1.6.10-release-961-IJ6777.52) de.docksnet.moddep (1.0.0) com.kn.diagrams.generator.generator (2022.2.0) org.asciidoctor.intellij.asciidoc (0.37.5) com.intellij.selenium (213.6777.8) PlantUML integration (5.11.1) mobi.hsz.idea.gitignore (4.3.0) org.jetbrains.kotlin-js-inspection-pack-plugin (0.0.9) kvision.project.wizard (0.3.0) com.haulmont.jpab (2022.1.2-213) Kotlin: 213-1.6.10-release-961-IJ6777.52
r
No more ideas 😞
j
OK - nevertheless many thanks for cross-checking! Have a nice day!
r
the same version of intellij and the same build
j
Then next thing is to throw away my checkout and pull fresh ...
I'll post here, if this helps.
a
Are you using WSL? I've read there are a few unexpected behaviours
j
Hi Adam, I use WSL but not in this context. kroviz should be Windows only.
BTW: removing my local repository and doing a fresh git clone didn't help.
r
One more idea - change the name of the project, remove
.idea
folder and then try to import it again.
a
hmm okay. What Gradle version is set in
gradle/wrapper/gradle-wrapper.properties
? Is IntelliJ configured to build and run with Gradle? And does it use Gradle from 'gradle-wrapper.properties'? Does the Gradle user home setting look sensible? jetbrains://idea/settings?name=Build%2C+Execution%2C+Deployment--Build+Tools--Gradle
r
if it wont't work it will mean something is wrong with your intellij installation
a
I think it's a problem with IntelliJ not being properly configured with Gradle. I think 'external libraries' should at least have gradle-api.jar
(but maybe that's because I have buildSrc in that project)
r
you could also upgrade your gradle wrapper to 7.4
👆 1
j
I'll check that - meanwhile I've found some wsl traces in idea.log - which I didn'expect. Robert, Adam - your input is very helpful!
👌 1
a
okay looking at the project now I see
gradle/wrapper/gradle-wrapper.jar
has been gitignored - you should add an override to make sure it's included https://github.com/github/gitignore/blob/main/Gradle.gitignore#L9 and then re-run
gradle wrapper
to get the right version
j
I'm doing a IJ reinstall and will check the gradle settings, as suggested. I'll let you know what happens.
👍 1
(still wonder what caused the problem)
So finally I'm back to indexed kvision files: idea.log had some entries related to failed plugin loads which led me to https://stackoverflow.com/questions/70899606/intellij-idea-dont-start-freezes-at-the-splash-screen-with-failed-to-create-a
A couple of restarts (windows) and reloads (Gradle) later and I can start working again. In the end it seems it had something to do with my companies network/VPN settings.
🎉 1