I am new to Gradle and have some confuse when learning Gradle.Say, I have a denpendency config:
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
I realize that classpath is a configuration for dependency and the closure after dependencies is delegate to DependencyHandler
object, and I referred the api of DependencyHandler found that it has a Dependency add(String configurationName, Object dependencyNotation);
method, but why there is no add
here? why can we add the dependency just like configurationName "group:name:version:classifier@extension"
other than
dependencies {
//classpath 'com.android.tools.build:gradle:2.3.3'
add ('classpath', 'com.android.tools.build:gradle:2.3.3')
}
Anyone some explain please.. Thanks