IntelliJ 2018 - Gradle Sync

Answered

Is it possible to customize the Idea Project configuration generated/updated by the native Intellij Idea Gradle tooling?

By using the Gradle IDEA Plugin  we can customize the .iml generated - but that doesn't appear to be called by the IDE itself.

(FWIW, we want to add dependencies when running a Spring Boot application inside IntelliJ, but not to be part of the build created by Gradle itself)

The https://github.com/JetBrains/gradle-idea-ext-plugin also looks  to have some interesting thigs I'd like to incorporate, but it doesn't appear to be called when the Gradle project is refreshed inside IntelliJ.

Cheers,

Charles

 

0
1 comment

>Is it possible to customize the Idea Project configuration generated/updated by the native Intellij Idea Gradle tooling?

Built-in Gradle integration is designed to be working out-of-the-box without needing to modify build.gradle file specifically to influence IDE project structure (i.e. dependencies, source sets). It aims to provide just the same experience as you would work with project from command line Gradle. Gradle Refresh action in IDE does exactly this. For additional customization specific Gradle plugins should be used and corresponding gradle tasks explicitly called. Please note `idea` Gradle plugin is developed by Gradle team.

Exception is the gradle-idea-ext-plugin - it does modify IDE settings on Refresh action called from IDE. Note that it generates only the settings that do not modify Gradle project structure (i.e. source sets or dependencies) but generates only IDE-specific settings, like run configurations, code styles etc. Full documentation is available at https://github.com/JetBrains/gradle-idea-ext-plugin/wiki/DSL-spec-v.-0.1

0

Please sign in to leave a comment.