Open gumil opened 8 months ago
Hello, can you share a minimal reproducing project?
You can fix this by doing the following:
This should fix the issue
This keeps happening every time I change something in the Gradle files. Having to invalidate caches every time is really slowing me down.
Hello, again, a small reproducing project would be helpful. Or a stripped down version of the project where you're reproducing this on could help too. You can also share me a private project privately if it's easier for you.
@tpockczerwinski @ganddev @sum-elier
Pinging you all 3 who thumbed this up, in case you can provide a reproducer as I'm asking just above.
Sorry. This is in a very complicated work project, so I can't share. I'll try to reproduce in a smaller project, but if anyone has something that they can share, please do. I'm guessing the important thing is having a buildSrc
and possibly multiple modules?
I've had the issue a while and as documented in the code, the reason is simply that the the settings
variable is not initialized when the IDE syncs only the buildSrc of the project (See the file here)
Why this happens after version 0.51.0 seems to be the addition of the DependenciesTracker.kt
file located here
I am in no way a good enough developer to pretend I understand what this file does and why but as you can see from the stacktrace below, this is the source of the issue.
I guess @LouisCAD, you would be more able to explain what this file does and why it was added and we may be able to understand what issue it's causing.
Caused by: java.lang.IllegalStateException: Property settings not initialized yet! Has it been used after reset or before init?
at de.fayard.refreshVersions.core.internal.ResettableDelegates$LateInit.getValue(ResettableDelegates.kt:27)
at de.fayard.refreshVersions.core.internal.RefreshVersionsConfigHolder.getSettings$refreshVersions_core(RefreshVersionsConfigHolder.kt)
at de.fayard.refreshVersions.core.internal.RepositoriesKt.withPluginsRepos(Repositories.kt:16)
at de.fayard.refreshVersions.core.internal.dependencies.DependenciesTracker.recordBuildscriptAndRegularDependencies(DependenciesTracker.kt:51)
at de.fayard.refreshVersions.core.internal.dependencies.DependenciesTracker.access$recordBuildscriptAndRegularDependencies(DependenciesTracker.kt:21)
at de.fayard.refreshVersions.core.internal.dependencies.DependenciesTracker$recordBuildscriptAndRegularDependencies$1.execute(DependenciesTracker.kt:26)
at de.fayard.refreshVersions.core.internal.dependencies.DependenciesTracker$recordBuildscriptAndRegularDependencies$1.execute(DependenciesTracker.kt:21)
@LouisCAD, have you had any chance to look into this? I know you must have a lot to deal with but this is an issue that can be reproduced (as @toddobryan said) by having a project with an application module, multiple library modules and a buildSrc
folder.
I did do some digging myself to identify the problematic file but I can't go further since I don't understand the code behaviour associated to the files.
Hey @gumil, I've been playing around because this bug has been plaguing my existence for the longest time and I'm curious about one thing.
Do you have this issue currently and if so, do you still have it with version 0.60.5, Gradle 8.5 and AGP 8.3.0 ? I've been running this on a project that had the issue and it seems to have gone now (which leads me to believe that is was somehow linked to the way Gradle and AGP worked together during sync)
🐛 Describe the bug
I updated to 0.60.3 from 0.51.0 and then when I do a gradle sync I have this error on my
buildSrc
module.Full stacktrace
✅ Expected behavior
It should sync properly
💣 Steps to reproduce
Do a gradle sync