의존성 옵션들

  • implementation: 의존 라이브러리 수정시 본 모듈까지만 재빌드

    • 본 모듈을 의존하는 모듈은 해당 라이브러리의 api 를 사용할 수 없음

  • api: 의존 라이브러리 수정시 본 모듈을 의존하는 모듈들도 재빌드

    • 본 모듈을 의존하는 모듈들도 해당 라이브러리의 api 를 사용할 수 있음

  • compileOnly: compile 시에만 빌드하고 빌드 결과물에는 포함하지 않음

  • runtimeOnly: runtime 시에만 필요한 라이브러리인 경우

  • annotationProcessor: annotation processor 명시 (gradle 4.6)

기존에 Gradle에서 사용하고 있는 compile은 추후 지원이 중단 되고 implementation으로 대체

 

대규모 다중 프로젝트 빌드에서 api/complile 대신 implementation을 사용하면 빌드 시스템이 재컴파일 해야 하는 프로젝트의 크기가 즐어들기 때문에 빌드시간이 상당히 개선 될수 있어 대체했다고 합니다.

아래는 andriod에 대한 설명이지만 spring(java)의 gradle 도 비슷할 거라 생각합니다

 

https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#

  • compile with implementation (if you don't need transitivity) or api (if you need transitivity)

  • testCompile with testImplementation

  • debugCompile with debugImplementation

  • androidTestCompile with androidTestImplementation

  • compileOnly is still valid. It was added in 3.0 to replace provided and not compile. (providedintroduced when Gradle didn't have a configuration name for that use-case and named it after Maven's provided scope.)

It is one of the breaking changes coming with Gradle 3.0 that Google announced at IO17.

 

 

'웹프로그래밍 > spring~~' 카테고리의 다른 글

spring project groupid, artifactid 네이밍  (0) 2019.07.15
@Data 어노테이션  (0) 2019.07.10
5장 1. Logback  (0) 2019.07.08
CDATA란?  (0) 2019.07.08
Maven vs Gradle  (0) 2019.06.05
maven wrapper  (0) 2019.06.05
Maven 이란~  (0) 2019.06.05
Spring PSA  (0) 2019.05.30
블로그 이미지

발전하는개발자

나의 인생에 필요한 정보들(프로그래밍, 철학, 운동...)

,