1,将项目初始化为gradle项目;
进入项目根目录,运行gradle init
熟悉gradle项目的构建目录:(1),build.gradle 用于项目构建以及自动化管理的任务配置脚本----包括构建以及管理两方面;
( 2),编译以及运行所依赖的目录gradle,其中包括jar文件以及properties配置文件;(3),系统运行脚本gradlew;(4),模块或者说子项目配置文件setting.gradle
2,创建一个任务;
task copy(type: Copy, group: "Custom", description: "Copies sources to the dest directory") { from "src" into "dest" }
3,任务的管理以及运行一个任务
gradlew tasks //查看所有可用任务
gradlew properties //查看项目中关于任务的属性
gradlew taskname //运行一个任务
使用gradle自带的任务自由组合创建更复杂的任务
3,应用一个插件
plugins { id "base" }