Reputation: 22666
Android Studio 3.2 Canary 5
Build #AI-173.4630681, built on March 3, 2018
JRE: 1.8.0_152-release-1136-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.4-300.fc27.x86_64
I have just started a new project and when I sync'd I got this dialog box.
I am just wondering what is the difference between the Android Gradle Plugin and Gradle.
How would I upgrade to Gradle to version 4.5? What is the purpose of both of these?
Many thanks in advance.
Upvotes: 43
Views: 19986
Reputation: 11
Gradle is a build tool that is used for building, testing, and deploying software. It is for manage project dependencies and automate tasks in programming languages, like Java and Kotlin but the AGP is a set of plugins for developers building android apps.It integrates with Gradle to provide Android-specific build configs.
Upvotes: 1
Reputation: 364928
Gradle is the build system.
You can use it with a lot of plugins. One of these is the Android Gradle plugin.
It is used to provide processes and configurable settings that are specific to building and testing Android applications.
Upvotes: 85
Reputation: 2558
The Android Studio build system is based on Gradle, and the Android plugin for Gradle adds several features that are specific to building Android apps. Although the Android plugin is typically updated in lock-step with Android Studio, the plugin (and the rest of the Gradle system) can run independent of Android Studio and be updated separately.
From the Docs
https://developer.android.com/studio/releases/gradle-plugin.html
Upvotes: 12
Reputation: 7968
Even if you have written the same java source code for a java project and android project, the way they are built and executed completely differs from each other.
Java project sources compiles to byte codes (.class files) and runs on JVM (java virtual machine).
Android project sources compiles to Dalvik byte codes (.dex files) and runs on DVM (Dalvik Virtual Machine). And both of these virtual machine have different ways of executing commands.
Android projects have many platform specific steps when building application that standard Java applications does not have. (like packaging as apk, automatic signing, project flavors management, minimum API level) With the addition of Android Gradle plugin these differences can be applied more easily and in a more refined way. (So building Android apps becomes easier for everyone).
Upvotes: 26