Skip to content
SPECIFICTION
Get listed

Dart pub vs Gradle

Dart pub

dart.dev

Gradle

gradle.org

Side by side

FigureDart pubGradle
Price from—Free
Free plan—Yes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
API—Yes
Plans published01
Spec score · Package Managers7.8 (#46)8.7 (#11)
Dependency managementPub resolves package versions that work together and with the installed Dart SDK.Gradle downloads and manages transitive dependencies and supports Maven and Ivy compatible repositories.
Dependency resolutionPub manages dependency versions to find versions compatible with each other and with the Dart SDK version.Yes
Free planYesYes
Lockfile supportYesYes
Offline installationYesYes
Package formatsDart packagesMaven,Ivy,flat directory
Private registry authYesYes
PurposePub is Dart’s package manager for managing package dependencies.Gradle Build Tool automates building software of any type, size, or complexity.
Supported platformsWindows,Linux,macOSWindows,macOS,Linux
Workspace supportYesYes

Plans

Dart pub

No plans published.

Dart pub pricing →

Gradle

  • Gradle Build ToolFree

Gradle pricing →

In their own words

Dart pub

Dart pub is Dart’s package manager for finding and managing shared libraries and tools. It resolves dependency versions compatible with one another and the installed Dart SDK, and records selected versions in a lockfile so application teams can keep dependency versions consistent. Packages may come from pub.dev, other hosted repositories, Git repositories, local paths, or supported SDKs. Developers can use pub through the dart or Flutter command-line tools, and most Dart-savvy IDEs support package workflows. The `dart pub publish` command uploads packages to pub.dev. Before publishing, pub checks for possible secret leaks using limited patterns and may warn or refuse publication; packages published to pub.dev cannot have Git or local path dependencies in their pubspec. Security advisories draw on the GitHub Advisory Database for Dart and Flutter packages. Pub can often resolve dependencies offline from its shared cache. It supports Windows, Linux, and macOS, and is free and open source.

Visit dart.dev

Gradle

Gradle Build Tool is a free, open-source system for automating software builds across projects of different types and sizes. Build logic can use either Kotlin DSL or Groovy DSL. Incremental builds, caching and parallel task execution support the build process, while Gradle downloads and manages transitive dependencies from Maven- and Ivy-compatible repositories. The Gradle Wrapper can provision a build environment and specify the Gradle version used by a project. Its ecosystem covers JVM, Android, C/C++, Swift, Objective-C and assembler projects, and it runs on Windows, macOS and Linux. The Tooling API lets IDEs and other tools inspect projects, run builds, receive progress events and cancel operations. Listed support includes Android Studio and Ant, plus Checkstyle, CodeNarc, PMD and JaCoCo. Gradle includes dependency verification. The maker says open-source security fixes are limited by its end-of-life policy; its Security Subscription offers prioritized fixes under SLA and extended maintenance, but does not guarantee a clean scanner report when findings come from third-party libraries.

Visit gradle.org