Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between "provided files" and "compile"

In Android studio in the "module settings" in the Dependencies tab you can select a scope for your library files. What is the difference between "compile" and "provided"?

like image 668
qryckbosch Avatar asked Jan 21 '15 14:01

qryckbosch


People also ask

What is compile only?

The compileOnly configuration is used to itemize a dependency that you need to compile your code, same as compile above. The difference is that packages your java code use from a compileOnly dependency will not be listed as Import-Package manifest entries.

What is a compile only dependency?

compileOnly dependencies are available while compiling but not when running them. This is equivalent to the provided scope in maven. It means that everyone who wants to execute it needs to supply a library with all classes of the CompileOnly library.


1 Answers

compile includes the library in your final APK, while provided doesn't; provided is a compile-time-only dependency.

like image 151
Scott Barta Avatar answered Oct 24 '22 16:10

Scott Barta