문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
gradle:testfixtures [2022/04/14 14:55] kwon37xi |
gradle:testfixtures [2022/04/15 09:57] (현재) kwon37xi [상위 모듈 설정] |
||
---|---|---|---|
줄 4: | 줄 4: | ||
* 이를 극복하기 위해 상위 모듈에 '' | * 이를 극복하기 위해 상위 모듈에 '' | ||
- | ===== 설정 ===== | + | ===== 상위 모듈 |
+ | * 설정 후 '' | ||
<code groovy> | <code groovy> | ||
plugins { | plugins { | ||
// which produces test fixtures | // which produces test fixtures | ||
id ' | id ' | ||
+ | } | ||
+ | // 상위 모듈 의존성 | ||
+ | dependencies { | ||
+ | testImplementation ' | ||
+ | |||
+ | // testFixtures 에 어떤 의존성이 필요할 경우 추가 | ||
+ | // API dependencies are visible to consumers when building | ||
+ | testFixturesApi ' | ||
+ | // Implementation dependencies are not leaked to consumers when building | ||
+ | testFixturesImplementation ' | ||
} | } | ||
</ | </ | ||
+ | |||
+ | ===== 하위 모듈에서 사용 ===== | ||
+ | <code groovy> | ||
+ | dependencies { | ||
+ | implementation(project(": | ||
+ | |||
+ | testImplementation ' | ||
+ | testImplementation(testFixtures(project(": | ||
+ | } | ||
+ | </ | ||
+ |