IntelliJ config files for Gradle project with enabled ExternalStorageConfigurationManager
已回答
If a Gradle project has enabled ExternalStorageConfigurationManager (in .idea/misc.xml), it seems to not generate any of the following files, so they presumably no longer need to be in a VCS:
*.iml
.idea/compiler.xml
.idea/modules.xml
But Gradle build does generate a file for each Gradle dependency like:
.idea/libraries/Gradle__groupid_artifactid_version.xml
I've ignored the library files in my VCS.
Are there any other IntelliJ config files IntelliJ might generate from a Gradle build in my project?
Are there any other IntelliJ config files that no longer need to be on the file system because Gradle config files will supply the same settings?
Thanks.
请先登录再写评论。
You can try the brand new https://github.com/JetBrains/gradle-idea-ext-plugin/wiki/DSL-spec-v.-0.1 plug-in.
This will allow to configure most of the things in the build script so that you don't have to share .idea folder in the VCS.
Without this plug-in you may need to share run/debug configurations and project specific code styles per https://intellij-support.jetbrains.com/hc/articles/206544839.
As far as I understand, the plug-in doesn't handle project specific code inspection profiles yet.
Thanks for the info.
Let me put my question slightly differently:
If I want to store in my VCS as many non-user-specific IDEA settings as possible when using a Gradle project with ExternalStorageConfigurationManager enabled, but if I don't want to store any files that are generated by IntelliJ from my Gradle settings, what files should I exclude from my VCS when not using the brand-new gradle-idea-ext-plugin? I guess that I should exclude the following filename regexes (please inform me if I shouldn't exclude any of the following, or if there are other filename regexes that I should also exclude):
If I use the brand-new gradle-idea-ext-plugin, what additional files can I exclude? I guess that I should exclude the following filename regexes (please inform me if I shouldn't exclude any of the following, or if there are other filename regexes that I should also exclude):
Here is the sample file you can start with: https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore.
With gradle-idea-ext-plugin you can also exclude .idea/runConfigurations directory if you define them in the Gradle build script.
Thanks. I'll investigate both the .gitignore andgradle-idea-ext-plugin.