provided– compile-time only dependencypackage– package-time only dependencycompile– compile-time and package-time dependency
provided is commonly used for annotation processing based libraries. Usually these libraries are separated in two artifacts – “annotation” and “compiler”. “compiler” is provided dependency because you do not need to use it in application, only for compilation; and “annotation” is compile dependency – it is used in application code and therefore compiles. Or generated code may require additional dependencies while your application may not. E.g. dagger dependencies configuration:
compile 'com.squareup.dagger:dagger:1.2.2'
provided 'com.squareup.dagger:dagger-compiler:1.2.2'