IDEA 2021.1 breaks Gradle sync for me. In `settin...
# gradle
m
IDEA 2021.1 breaks Gradle sync for me. In
settings.gradle.kts
the value of
System.getProperty("user.dir")
is now
/
instead of the project’s path. Gradle command line works fine though 🤔
y
Hi, @Marc Knaup! Could you please check that Project SDK has correct JDK value?
m
All fine and valid. It worked minutes ago.
(the
println
thing)
y
It broke right after IDEA upgrade or after some time?
m
The unresolved
println
was after some time.
Now I’m getting IDE errors with
com.intellij.psi.stubs.UpToDateStubIndexMismatch: PSI and index do not match.
. Probably related. Have submitted through IDE.
Now it’s resolving
println
again 😮
t
I had some weird behavior as well, resolved by wiping stuff. a sort of nuclear action. my steps to fix, and now it is been some days and no more problems close the project, 
File -> Close Project
quit idea remove 
~/Library/Application\ Support/JetBrains/IntelliJIdea2021.1/
remove 
~/Library/Caches/JetBrains/IntelliJIdea2021.1/
restart idea (I am on mac obviously)
by weird behavior, I mean some libraries were resolved, some (most) not, a banner
Kotlin not configured
appeared
v
Original problem could also be related to https://youtrack.jetbrains.com/issue/IDEA-266067
m
The two issues I’ve posted are likely unrelated. The original of this thread was about determining the project directory :)
The other issue with unresolved symbols was my other message. I wish there was a single IDE update where I don’t run into new Gradle issues 😅
v
Don't blame it to Gradle 😄
The problem in my issues is also a problem of working directory
m
Didn’t do 😉
v
The JBR dir is the working dir when generating accessors for precompiled script plugins and that doesn't work as then some directories cannot be created of course.
That's why I thought it might be related
m
Yeah relying on the working directory wasn’t a good approach to begin with.
file(".")
seems to be the most sensible solution.
v
layout.projectDirectory
m
layout
is unresolved.
v
Where?
m
settings.gradle.kts
v
Ah, that was a project service, sorry
settingsDir
then 🙂
m
That’s also interesting 🙂