티스토리 뷰

Programming/Gradle

Gradle Build Dependency

Albothyl 2019. 11. 30. 20:04

Gradle 3.0 버전부터 기존에 사용하던 compile이 api와 implementation으로 나뉘어 졌다.

- api: 모듈의 dependency를 complie 시점부터 공유한다.

- implementation: 모듈의 dependency를 runtime 시점부터 공유한다.

 

java에서 api, implementation을 사용하려면 apply plugin: 'java-library' 를 추가해야 한다.

 

참고

- https://developer.android.com/studio/build/dependencies?hl=ko

 

빌드 종속성 추가  |  Android Developers

Android 스튜디오에서 Gradle 빌드 시스템을 이용하여 빌드 종속성을 추가하는 방법에 관해 알아보세요.

developer.android.com

- https://jongmin92.github.io/2019/05/09/Gradle/gradle-api-vs-implementation/

 

(Gradle dependency) api와 implementation 차이 - 92Hz | Jongmin's Blog

build script의 dependencies 블록에 여러 가지 다양한 종속성 구성(api, implementation, compileOnly, runtimeOnly, annotationProcessor)을 사용하여 라이브러리 종속성을 선언할 수 있습니다. 다양한 종속성 구성 중 api와 implementation의 차이에 대해서 알아봅니다. api & implementation Gradle document에서는 api와 implementation에 대

jongmin92.github.io

- https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_configurations_graph

 

The Java Library Plugin

The Java Library plugin expands the capabilities of the Java plugin by providing specific knowledge about Java libraries. In particular, a Java library exposes an API to consumers (i.e., other projects using the Java or the Java Library plugin). All the so

docs.gradle.org

 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
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 31
글 보관함