Zobrazení závislostí v Gradle

Pro zobrazení závislostí v Gradle ve stromové struktuře použijte taks dependencies.

./gradlew dependencies
compileClasspath - Compile classpath for compilation 'main' (target  (jvm)).
+--- org.springframework.boot:spring-boot-starter-data-jpa -> 2.1.9.RELEASE
|    +--- org.springframework.boot:spring-boot-starter-aop:2.1.9.RELEASE
|    |    +--- org.springframework.boot:spring-boot-starter:2.1.9.RELEASE
|    |    |    +--- org.springframework.boot:spring-boot:2.1.9.RELEASE
|    |    |    |    +--- org.springframework:spring-core:5.1.10.RELEASE
|    |    |    |    |    \--- org.springframework:spring-jcl:5.1.10.RELEASE
|    |    |    |    \--- org.springframework:spring-context:5.1.10.RELEASE
|    |    |    |         +--- org.springframework:spring-aop:5.1.10.RELEASE
|    |    |    |         |    +--- org.springframework:spring-beans:5.1.10.RELEASE
|    |    |    |         |    |    \--- org.springframework:spring-core:5.1.10.RELEASE (*)
|    |    |    |         |    \--- org.springframework:spring-core:5.1.10.RELEASE (*)
|    |    |    |         +--- org.springframework:spring-beans:5.1.10.RELEASE (*)
|    |    |    |         +--- org.springframework:spring-core:5.1.10.RELEASE (*)
|    |    |    |         \--- org.springframework:spring-expression:5.1.10.RELEASE
|    |    |    |              \--- org.springframework:spring-core:5.1.10.RELEASE (*)
|    |    |    +--- org.springframework.boot:spring-boot-autoconfigure:2.1.9.RELEASE
|    |    |    |    \--- org.springframework.boot:spring-boot:2.1.9.RELEASE (*)
|    |    |    +--- org.springframework.boot:spring-boot-starter-logging:2.1.9.RELEASE
|    |    |    |    +--- ch.qos.logback:logback-classic:1.2.3
|    |    |    |    |    +--- ch.qos.logback:logback-core:1.2.3
|    |    |    |    |    \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.28
|    |    |    |    +--- org.apache.logging.log4j:log4j-to-slf4j:2.11.2
|    |    |    |    |    +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.28
|    |    |    |    |    \--- org.apache.logging.log4j:log4j-api:2.11.2
|    |    |    |    \--- org.slf4j:jul-to-slf4j:1.7.28
|    |    |    |         \--- org.slf4j:slf4j-api:1.7.28
|    |    |    +--- javax.annotation:javax.annotation-api:1.3.2
|    |    |    \--- org.springframework:spring-core:5.1.10.RELEASE (*)
|    |    +--- org.springframework:spring-aop:5.1.10.RELEASE (*)
|    |    \--- org.aspectj:aspectjweaver:1.9.4
|    +--- org.springframework.boot:spring-boot-starter-jdbc:2.1.9.RELEASE
|    |    +--- org.springframework.boot:spring-boot-starter:2.1.9.RELEASE (*)
|    |    +--- com.zaxxer:HikariCP:3.2.0
|    |    |    \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.28
|    |    \--- org.springframework:spring-jdbc:5.1.10.RELEASE
|    |         +--- org.springframework:spring-beans:5.1.10.RELEASE (*)
|    |         +--- org.springframework:spring-core:5.1.10.RELEASE (*)
|    |         \--- org.springframework:spring-tx:5.1.10.RELEASE
|    |              +--- org.springframework:spring-beans:5.1.10.RELEASE (*)
|    |              \--- org.springframework:spring-core:5.1.10.RELEASE (*)

Pokud máte projekt, který se skládá z více modulů/projektů

> Task :projects

------------------------------------------------------------
Root project
------------------------------------------------------------

Root project 'my-service'
+--- Project ':my-service-client'
\--- Project ':my-service-service'

přepněte se v adresářové struktuře do daného modulu tam spusťte příkaz

../gradlew dependencies

Pro určitý modul je to pak

./gradlew service:dependencies

a pro určitou konfiguraci

./gradlew service:dependencies --configuration testCompileClasspath

Napsat komentář