apply plugin: 'android' or apply plugin: 'com.android.application' apply plugin: 'android' or apply plugin: 'com.android.application' android android

apply plugin: 'android' or apply plugin: 'com.android.application'


apply plugin: 'android' specifies that It's an Android project but it does not specify Its an Application or Library project. To make life easier you can tell gradle the type of project and indicate which plugin should be used. I recommend to use apply plugin: 'com.android.application if project is an app and apply plugin: 'com.android.library' if project is a lib. It helps gradle to compile project efficiently.

Click here for detailed explanation -


Which one should be used ?

apply plugin: 'com.android.application'

What are the differenceres?

They renamed the plugin to comply with the naming convention that Gradle is starting to adopt for plugins, with an eye towards a new plugin system in future versions of Gradle.