I am trying to set up a multi-project gradle build in IDEA 13. I am applying the idea plugin to all projects but letting IDEA manage the module files (I didn't run any gradle idea plugin tasks manually). One of the projects is web/war and I want to customize the generated web facet. In the gradle docs, I don't see any DSL documentation about the web facet, so I think I need to use withXml to change the generated .iml.
Unfortunately, withXml seems to have no impact on the generated .iml. I make a change to build.gradle, "refresh" via the Gradle window, and nothing changes in the output. Currently I have simplified to the example code from the gradle docs:
def node = it.asNode()
node.appendNode('butAlso', 'I find increasing pleasure tinkering with output *.iml contents. Yeah!!!')
Other changes via idea.module (scopes, excludeDirs, etc) are reflected in the .iml. Any ideas? Hopefully I am missing something simple/obvious.