본문 바로가기
모바일/Android

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.

by 죠부니 2018. 7. 30.
반응형

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.

It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html


https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration?hl=ko


안드로이드 스튜디오 버전업으로 인한 Gradle변경사항


종속성 관련

새 구성지원 중단된 구성동작
implementationcompile컴파일 타임에는 모듈에 종속성을 사용할 수 있으며, 런타임에만 모듈 소비자에게 종속성을 사용할 수 있습니다. 대규모의 다중 프로젝트 빌드에서 api/compile 대신 implementation을 사용하면 빌드 시스템이 재컴파일해야 하는 프로젝트의 크기가 줄어들기 때문에 빌드 시간이 상당히 개선될 수 있습니다. 대부분의 앱과 테스트 모듈은 이 구성을 사용해야 합니다.
apicompile컴파일 타임에는 모듈에 종속성을 사용할 수 있으며, 컴파일 타임과 런타임에는 모듈 소비자에게도 종속성을 사용할 수 있습니다. 이 구성은 compile(지금은 지원 중단됨)과 마찬가지로 동작하며 일반적으로 이 구성은 라이브러리 모듈에서만 사용해야 합니다. API를 별도 테스트 모듈에 노출시키지 않으려면, 앱 모듈이 implementation을 사용해야 합니다.


대부분은

implementation을...

반응형