Gradle是什么?
Gradle是Java的build tool,是maven, ant的后代产品。Gradle也是是现在Android的默认build tool。Gradle由Gradle公司团队维护和开发。build.gradle是代替maven里的pom.xml的项目配置文件,其作用类似于C/C++里的Makefile。
Gradle入门
本文用Intelij Idea 2019.3.3为例子创立新的Java项目。





plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
以上是自动生成的build.gradle文件