Excited: springboot gave up maven, chose gradle, gradle built springboot

Preface

Many people are curious about why Maven is used well, why switch to gradle?
The main reason given by the Spring Boot team is that migrating to Gradle can reduce the time it takes to build the project .
The purpose of Gradle is to reduce the workload of the build. It can build any changes or build in parallel as needed. Of course, the Spring Boot team also spent a lot of time trying to use Maven for parallel construction, but because of the complexity of building Spring Boot projects, it ultimately failed.
In addition, the Spring Boot team has also seen the use of Gradle in other Spring projects and the improvement brought by parallel construction, and can also use Gradle's build cache on some third-party projects. These advantages have prompted Gradle to build Spring Boot projects. Come in.
The following is a comparison of the maven build time given by springboot official:
Insert picture description here
Spring Boot official also gives data, a complete Maven project build generally takes an hour or more, and in the past 4 weeks, the average time of using Gradle to build is only used It took 9 minutes and 22 seconds! ! !

Impact on existing projects

Many friends may want to say that since the trend of springboot is to switch to gradle, the project I currently have is built with maven. What is the impact?
Although gradle is officially supported, the maven build project currently used can still be used without any impact. But the editor encourages everyone to try gradle, maybe you will fall in love with gradle just like you switched from eclipse to idea.

Springboot uses gradle steps

1. Install gradle:

gradle -v

2. Idea new gradle project

  1. New gradle project:
    Insert picture description here
  2. Click finish
    Insert picture description here
  3. Click the help recognized by idea by default: OK (idea automatically downloads and builds)
    Insert picture description here
    Insert picture description here

Guess you like

Origin blog.csdn.net/penggerhe/article/details/108342278