I am using <VERSION-CATALOG FEATURE> but while dec...
# gradle
p
I am using VERSION-CATALOG FEATURE but while declaring dependency autocomplete feature is not working. Is this expected behavior?
b
you need to run build at least once after declaring new version i think
So that gradle could generate those accessors
p
let me check
Class generated but sadly autocomplete doesn’t work😬
b
Looks like an IDE issue, then. Invalidate caches/ restart?
p
no luck
v
Where do you try to use it?
Or asked differently, does what you write compile and run properly from command line and it is just IntelliJ where no completion is working, or does it also not work from commandline?
p
I am using android studio
v
Ah, Android Studio, important information
Android Studio is based on an IntelliJ version that does not properly support this feature yet. You can hackily work-around it, so that it works, but I'm not sure you want that. 😄 Other than that, you need to wait for an AS version with the fix included.
a
I’m using version catalog in AS 2020.3.1 and auto-complete is working well. I’m defining dependencies using libs.versions.toml instead of in settings.gradle, though.
v
Where you define them shouldn't be important. If it works in that AS version, I guess they backported the fix that is available in IntelliJ 2021.1.
p
I am using latest in the market -
2.4.1
I have created issue regarding this on issuetracker. Hope they reply asap.
v
You mean 4.2.1 I guess and I already told you what the problem is, didn't I?
And also what your options are
• Live with it being red in the ide • Wait for a version that includes the upstream fix • Ist a very hacky workaround that makes it displayed properly in the ide
p
Yeah I should wait for the fix. Thanks🙂