Gradle Series 1-A brief introduction to Gradle

If you want to learn a technology, you need to understand its history. What problems does this technology appear to solve?

Project construction history

1. The Stone Age

Dependency management: If you use a third-party library for the project at the beginning, you need to manually put the jar package of the library into the lib directory. Each time these jar packages create a new project, you need to copy a copy. If the jar package With more, it is also easy to have version conflicts. It is very troublesome to use.
Test: Every function needs to write test class. Writing test class in main is also a very troublesome thing.
Packaging: packaging through ide (elipse) and then passing it to the server or putting it into a dependent project, it is also very troublesome to
upload: upload the jar package to the project through some file upload tools

The above operations are very frequent and repetitive. In order to reduce this kind of repeated brick-moving work, there are construction tools.

2. The Industrial Age: Building Tools

Dependency management: The jar packages are managed in a unified way, which is more clear and convenient. The jar packages are put in one place, and each project does not need to be copied again.
** Automation: ** Can be automatically tested, packaged, and released

Mainstream build tools

Ant (Apache Ant): A tool that automates the steps of software compilation, testing, and deployment, and is mostly used for software development in the Java environment.
Maven: Most of the build tasks are borrowed from Ant. Dependency management and project release
Gradle: use Groovy language to build scripts, instead of using XML like Maven

Introduction to gradle

An open source project automation build tool, built on the concepts of Apache Ant and Apache Maven, and introduces Groovy-based domain-specific language (DSL), instead of using XML to manage build scripts

DSL (Domain Specific Language): A computer programming language with limited expressivity for a certain field. It's just a concise language made for a certain field, not for universal design

Published 159 original articles · 22 praises · 90,000+ views

Guess you like

Origin blog.csdn.net/ytuglt/article/details/104951438