Gradle: IntelliJ as an โ€œexportโ€ dependency?

Is there a version of the 'export' dependencies on the IntelliJ idea in gradle?

In IntelliJ IDEA, if I have a module A, depending on module B and module B, depending on module C, then the dependencies of module B will only be exported to module A if exported is set to true .

I am currently writing a script to convert my IntelliJ projects to a Gradle project. How Gradle handles transitive dependencies in buildscript when writing:

dependencies { compile project(':DependentProject') // exported = true, but how? } 

Thanks in advance!

+6
source share
2 answers

In Gradle, the dependencies of module B will be automatically exported to A, although the details of how this works are different (for example, there is conflict resolution).

+1
source

The easiest way would be to apply the idea plugin in your script and then run gradle idea . Then, simply double-click the .ipr file to open the project.

When you do this, IntelliJ IDEA will receive direct and transitive dependencies - provided that they are declared correctly and can be found.

0
source

Source: https://habr.com/ru/post/957707/


All Articles