I've been looking for examples of having Gradle automatically configure the Spring facet when importing into IDEA and I haven't seen one, so I finally sat down and did it.
One annoying part is that the set of Spring configuration files (i.e. classes annotated with @Configuration) and the XML application context files need to be specified when Gradle is creating the project (IML) file. I'd rather not hardcode the list of files in my Gradle build script or some other config file.
Short of having Gradle search for XML files based on file name patterns within the resources of the project and using something like Spring's ClassPathScanningCandidateComponentProvider in the build script to scan for classes annotated with @Configuration on a limited classpath, does anyone have other approaches to solving this?
I was really hoping whatever utility classes IDEA itself uses would be made available so that a custom Gradle plugin (or the official IDEA plugin for Gradle) could do the scanning as part of the Gradle build...