1、初始化一个gradle目录结构化的java工程
gradle init --type java-application
gradle init --type java-application
gradle init --type java-application
2、初始化一个gradle目录结构化的java库工程
gradle init --type java-library
gradle init --type java-library
gradle init --type java-library
3、速度太慢想切换国内镜像
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
...
}
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
...
}
repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public' } ... }
4、查看依赖树
gradle dependencies
gradle dependencies
gradle dependencies
5、更新项目中的gradle版本
./gradlew wrapper --gradle-version 6.0.1
./gradlew wrapper --gradle-version 6.0.1
./gradlew wrapper --gradle-version 6.0.1