I have a Gradle project with modules. moduleA contains only protobuf files and produces a jar file with classes generated from the .proto files. moduleB depends on the moduleA (implementation project(':moduleA')).
moduleA
│ build.gradle
│ src
│ └───main
│ └───proto <-- proto file defining gRPC services
moduleB
│ build.gradle
│ src <-- code dependent on classes generated from moduleA
build.gradle
The project works well if I build/run it from Gradle.
Problem: IntelliJ IDEA doesn't see the classes generated from moduleA in sources of moduleB (imports are red).
Question: How to make IntelliJ IDEA correctly recognize classes built from .proto files?
I am using IntelliJ IDEA 2020.2.4 (Ultimate Edition).