Android

gradle compile 이 deprecated 되었다.

aucd29 2018. 4. 24. 10:05
com.android.tools.build:gradle 이 3.0.0 이 되면서 적용된 듯 싶은데
고객사에 aar 파일들을 배포할때는 gradle 를 console 에서 빌드해서 전달하는 덕분에? 해당 경고를 알고 수정하긴 했는데 요즘은 build 시 따로 알려준다.

암튼 일단은 compile -> implemetation 으로 가이드 되었는데 얼마전 android studio 를 업데이트 하고 나니 implementation and api 로 변경되어 있어서
api 는 먼지 살펴 보았는데

compile == api 인거 같고
implementation 은 라이브러리 참조 방식이 좀 다른 형태인듯 한데

cpp 로 비유하자면
api == static build
implementation == dynamic build 형태 인듯 싶다.

일단 예전에는 a 에서 b 를 참조하면 c 에서 a 를 참조했을때 b 가 따라 들어왔는데 implementation 로 참조시에는 c 에서 a, b 를 모두 선언해주어야 했다.

자세한 설명이 있는 링크가 있구나 ㄷ ㄷ
- https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html?utm_source=android-studio#new_configurations