square / anvil

A Kotlin compiler plugin to make dependency injection with Dagger 2 easier.
Apache License 2.0
1.31k stars 82 forks source link

IDE not syncing on fresh pull #757

Closed danielPerez97 closed 1 year ago

danielPerez97 commented 1 year ago

I've cloned the repository down and am trying to build and modify the plugin for learning purposes. It get's hung up on this error in IntelliJ Ultimate:

> Could not get unknown property 'libs' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

There appears to be some includeBuild magic going on and the :gradle-plugin project doesn't end up using the super-projects libs.versions.toml.

How can I get this to behave properly? I'd be happy to put this information into a BUILDING.md file or something. Thank you.

Edit: I'm using the following: IntelliJ IDEA 2023.2.3 Ultimate Edition Gradle Wrapper JDK 11.0.20

apramana commented 1 year ago

This is a dupe of #744. Specifying the version catalog location in the plugin project settings file should fix it, but not sure if there's any consequences to doing so (or why it's necessary in the first place.)