2016-10-12 2 views
2

gradle dependencies을 사용하면 모든 종속성 목록이 많습니다. 내가 의존하는 프로젝트의 모든 종속성을 보여줍니다. 표시된 목록의 깊이를 제한 할 수 있습니까?
예 :표시되는 그라디언트 종속성의 깊이 제한

+--- com.company.common:e-common-junit:0.29.0-SNAPSHOT 
| +--- junit:junit:4.11 (*) 
| \--- commons-io:commons-io:2.4 
\--- org.slf4j:slf4j-log4j12:1.7.6 
    +--- org.slf4j:slf4j-api:1.7.6 
    \--- log4j:log4j:1.2.17 

제한된 Gradle을 사이트에서만 +--- com.company.common:e-common-junit:0.29.0-SNAPSHOT
에가 :

dependencies - Displays all dependencies declared in root project 'projectReports'. 
api:dependencies - Displays all dependencies declared in project ':api'. 
webapp:dependencies - Displays all dependencies declared in project ':webapp'. 

심지어이 보고서는 this official source에서 큰 얻을 수 mentiones.
--configuration을 사용해야한다고 말하고 있지만이 기사에 대한 제 이해는 compile, testCompile 등으로 제한됩니다. 깊이는 아닙니다. 사용
버전 gradle 2.11

+0

종속성 출력을 필터링하는 데는 그라데이션 방법이 없지만 grep을 사용하여보고 싶지 않은 것을 필터링 할 수 있습니다. – RaGe

답변

1

사용 그렙 :

  • 만보기 최고 수준의 종속성 :
    gradle dependencies --configuration compile | grep -v '| '

  • 가 표시 두 가지 수준 :
    gradle dependencies --configuration compile | grep -v '| | '

etc

+0

나는 Powershell에서 일하고있다. 그러나 이것은 여전히 ​​도움이 될 것이다. –

+0

나는'| select-string -Pattern 'thepattern'-NotMatch'가 작동합니다. – RaGe