Need advice about which tool to choose?Ask the StackShare community!
Gradle vs Packer: What are the differences?
Developers describe Gradle as "A powerful build system for the JVM". Gradle is a build tool with a focus on build automation and support for multi-language development. If you are building, testing, publishing, and deploying software on any platform, Gradle offers a flexible model that can support the entire development lifecycle from compiling and packaging code to publishing web sites. On the other hand, Packer is detailed as "Create identical machine images for multiple platforms from a single source configuration". Packer automates the creation of any type of machine image. It embraces modern configuration management by encouraging you to use automated scripts to install and configure the software within your Packer-made images.
Gradle can be classified as a tool in the "Java Build Tools" category, while Packer is grouped under "Infrastructure Build Tools".
Some of the features offered by Gradle are:
- Declarative builds and build-by-convention
- Language for dependency based programming
- Structure your build
On the other hand, Packer provides the following key features:
- Super fast infrastructure deployment. Packer images allow you to launch completely provisioned and configured machines in seconds, rather than several minutes or hours.
- Multi-provider portability. Because Packer creates identical images for multiple platforms, you can run production in AWS, staging/QA in a private cloud like OpenStack, and development in desktop virtualization solutions such as VMware or VirtualBox.
- Improved stability. Packer installs and configures all the software for a machine at the time the image is built. If there are bugs in these scripts, they'll be caught early, rather than several minutes after a machine is launched.
"Flexibility" is the top reason why over 106 developers like Gradle, while over 24 developers mention "Cross platform builds" as the leading cause for choosing Packer.
Gradle and Packer are both open source tools. It seems that Gradle with 9.23K GitHub stars and 2.7K forks on GitHub has more adoption than Packer with 9.1K GitHub stars and 2.47K GitHub forks.
Netflix, Lyft, and 9GAG are some of the popular companies that use Gradle, whereas Packer is used by Instacart, Oscar Health, and Razorpay. Gradle has a broader approval, being mentioned in 465 company stacks & 360 developers stacks; compared to Packer, which is listed in 115 company stacks and 21 developer stacks.
Pros of Gradle
- Flexibility110
- Easy to use51
- Groovy dsl47
- Slow build time22
- Crazy memory leaks10
- Fast incremental builds8
- Kotlin DSL5
- Windows Support1
Pros of Packer
- Cross platform builds27
- Vm creation automation8
- Bake in security4
- Easy to use1
- Good documentation1
Sign up to add or upvote prosMake informed product decisions
Cons of Gradle
- Inactionnable documentation8
- It is just the mess of Ant++6
- Hard to decide: ten or more ways to achieve one goal4
- Bad Eclipse tooling2
- Dependency on groovy2