It’s the new build tool that Google wants to use for Android. It’s being used due to it being more extensible, and useful than ant. It is meant to enhance developer experience.
With Gradle, Android developers can use a simple, declarative DSL to configure Gradle builds supporting a wide variety of Android devices and App stores.
Gradle is a project automation tool that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the more traditional XML form of declaring the project configuration.
The initial plugins are primarily focused around Java, Groovy and Scala development and deployment, but more languages and project workflows are on the road map. more en.wikipedia.org/wiki/Gradle
You should see a list of available tasks. Assuming you run Gradle in a folder that does not contain a build.gradle file, you see basic tasks such as the following:
Now Write this on Command Prompt . type : gradle tasks See the Result for this
Even though these tasks are available, they do not offer much value without a project build configuration. As you flesh out the build.gradle file, some of these tasks become more useful. The list of tasks will grow as you add plugins to the build.gradle file. You can run gradle tasks again to see what new tasks are available.
>Build Android code:
The most simple Android project has the following build.gradle file.Flowing this file build.gradlehas depend all of your project structure.
As an Amazon Associate I earn from qualifying purchases.