There are some tedious steps to create a project using plug-ins when using Gradle. These steps can be replaced with some gradle templates.
Specific operation steps:
Install Gradle:
Prerequired:java SDK Installed
1. Dowload Gradle from:http://gradle.org/downloads2. Set Gradle Home Environment variable:gradle_home. Pointing to the place where the Gradle binaries is3. ADD%gradle_home%\bin; To your PATH environment variable STRING4. Run gradle-v command to test your installation and configuration is correct
To apply the Gradle template:
Download Gradle template, it is recommended to use https://github.com/townsfolk/gradle-templates download zip file can be extracted to the path (such as D:\gradle-template)
Locate the%userprofile%/.gradle/init.gradle file (if not, please refer to http://gradle.org/docs/current/userguide/init_scripts.html to create one)
File contents:
Gradle.beforeproject {prj--
Prj.apply from: ' E:\\gradle\\gradle-templates\\installation\\apply.groovy '
}
The cmd command executes. Gradle tasks. You can see that the commands involved in the template are loaded.
Use of Gradle templates