티스토리 뷰

참고링크

[참고]Gradle 관련 정보

까오기 2019. 3. 19. 17:01

Gradle에서 자주 사용하는 plugin 정보와 내용입니다. 



Table 1. Java Library plugin - configurations used to declare dependencies
Configuration name Role

api

Declaring API dependencies

implementation

Declaring implementation dependencies

compileOnly

Declaring compile only dependencies

runtimeOnly

Declaring runtime dependencies

testImplementation

Test dependencies

testCompileOnly

Declaring test compile only dependencies

testRuntimeOnly

Declaring test runtime dependencies

Table 2. Java Library plugin — configurations used by consumers
Configuration name Role

apiElements

For compiling against this library

runtimeElements

For executing this library

Table 3. Java Library plugin - configurations used by the library itself
Configuration name Role

compileClasspath

For compiling this library

runtimeClasspath

For executing this library

testCompileClasspath

For compiling the tests of this library

testRuntimeClasspath

For executing tests of this library

새 구성 지원 중단된 구성 동작
implementation compile

수정 시 사용하는 모듈까지만 재빌드를 한다. 

종속된 모듈의 하위 dependency를 패키지에 포함되지않는다. 

api compile

수정 시 연관된 모든 모듈을 재빌드 한다.

종속된 하위 모듈 모두를 패키지에 포함한다. 

compileOnly provided Gradle이 컴파일 클래스 경로에만 종속성을 추가합니다(빌드 출력에 추가되지 않음). 
runtimeOnly apk

Gradle이 런타임 시에 사용하도록 빌드 출력에만 종속성을 추가합니다. 

annotationProcessor compile 주석 프로세서인 라이브러리에 종속성을 추가하려면 반드시 annotationProcessor구성을 사용하여 주석 프로세서 클래스 경로에 추가해야 합니다. 그 이유는 이 구성을 사용하면 컴파일 클래스 경로를 주석 프로세서 클래스 경로와 분리하여 빌드 성능을 향상할 수 있기 때문입니다. 



'참고링크' 카테고리의 다른 글

개발 관련 유용한 사이트 링크  (0) 2019.01.08
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함