Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between pub dependencies and dev_dependencies?

Tags:

What is the difference in dependencies and dev_dependencies in a pubspec.yaml? It seems that when I run pub get the dev_dependencies aren't downloaded.

like image 722
Austin Cummings Avatar asked Aug 20 '15 02:08

Austin Cummings


People also ask

What is Dev_dependencies?

dev_dependencies are dependencies that are not available for code in the resulting application, but only for tests, examples, tools, or to add executable tools like for code generation to your project.

What is difference between dependencies and DevDependencies flutter?

A dependency is a library that a project needs to function effectively. DevDependencies are the packages a developer needs during development.

What is flutter dependency?

A dependency is another package that your package needs in order to work. Dependencies are specified in your pubspec. You list only immediate dependencies—the software that your package uses directly. Pub handles transitive dependencies for you.


1 Answers

dev_dependencies are dependencies that are not available for code in the resulting application, but only for tests, examples, tools, or to add executable tools like for code generation to your project.

dev_dependencies of any dependencies in your project (dependencies or dev_dependencies) are always ignored when you publish to pub.dev.

See also https://dart.dev/tools/pub/pubspec

like image 86
Günter Zöchbauer Avatar answered Oct 23 '22 08:10

Günter Zöchbauer