In our project, the .iml files and .idea/libraries/*.xml files are currently being generated from the .gradle files.
What we find is that the library files all reference the .jar file directly in the cache. Then, because they are doing this, after any particular update from source control, we can find the project is suddenly in an unusable state. Since IDEA itself has numerous bugs which appear to make it impossible to refresh from the Gradle project, this means one more command to run manually from the command-line any time anyone might have made a change, which is to say, every single update from source control.
What I would prefer to see is the libraries configured as proper maven libs in the IDEA project. This way, after updating, IDEA would hopefully realise which libraries it hasn’t fetched the jars for yet and download them automatically. Then hopefully it will be OK to expect things to just work, which is pretty far from what we have right now.