Search

[학습] 의존성 관리

Tags
학습
Gradle
Published Date
2024/09/17

주제

Gradle 학습

목표

Gradle의 의존성 시스템에 대해서 이해한다

키워드

automated
resolving external resources
jars, plugins, libraries, source code
versions
libraries
bundles
plugins
version catalog
libs.versions.toml
build.gradle
implementation
testImplementation
gradlew app:dependencies

정리

의존성 관리란 프로젝트에서 필요로 하는 리소스를 외부 저장소에서 자동으로 가져오는 것을 말한다
리소스로는 jars, plugins, libraries, source code를 말한다
프로젝트에 의존성을 추가하기 위해서는 build.gradle(.kts) 파일을 작성한다
plugins { alias(libs.plugins.androidApplication) } dependencies { // Dependency on a remote binary to compile and run the code implementation(libs.googleMaterial) // Dependency on a remote binary to compile and run the test code testImplementation(libs.mockitoCore) }
Groovy
복사
implementation
compile, production code에 사용된다
testImplementation
compile, test code에 사용된다
./gradlew :depndencies 로 프로젝트의 의존성을 확인할 수 있다

참조

다음 질문

task란?