TL; DR
The message is of recommendation, not obligation, but it is worth using Gradle in the project.
Gradle
Gradle is a build automation tool, that is, processes that involve your code for compilation, packaging, testing and distribution.
A project that uses Gradle must have at least one build.gradle
file with the necessary settings.
IDEs such as Eclipse and IntelliJ, the latter the basis of Android Studio , make use of the Gradle configuration for some automatic settings, although it is perfectly possible to perform these settings manually, that is, without Gradle.
Gradle is usually recommended for Android development rather than manual configuration, because it greatly facilitates development and standardizes the procedures for compiling and distributing the project.
Simple setup example
A documentation gives an example of a simple setup for an Android project:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.1.0'
}
Build Init Plugin
For some common project types, there is a Gradle plugin that allows you to generate the basic configuration: Build Init Plugin . For example, if you have Gradle installed you can run the following command line:
gradle init --type java-library
The basic configuration will be created according to the project type ( type
). However, this plugin is still in the process of incubation and still has no option for an Android project. Also, the configuration is basic and most likely more specific changes will be needed.
Of course, each project can have different settings and you will probably need to go through the documentation a bit to get all the details.
Considerations
Build automation is something that can give you a headache at first, especially the first time you do it, but it's something you pay for over time.
At this point, a few times you can rely on IDEs or tools to generate a basic configuration, but I do not recommend relying on it or always following it. It's best to take a little time to understand the basics of how Gradle works.