Why are the configuration styles inconsistent in gradle? -


i new gradle , few things of gradle confuses me. things appear inconsistent coding / configuration style.

for example, when configure repository jcenter or mavencentral call function / method e.g. jcenter.

repositories {      jcenter()   } 

however, in same file, when try configure dependency not call functions / methods anymore.

dependencies {    classpath 'com.android.tools.build:gradle:2.3.1' } 

and there variables getting values

productflavors {     prod {         versionname = "1.0-paid"     }     mock {         versionname = "1.0-free"     } } 

i sure there reason behind perceived inconcistency not find when read through documentation. explain reason?

actually these examples not different.

classpath 'com.android.tools.build:gradle:2.3.1' 

is function call well. groovy (the language in gradle build scripts written) allows leave out parenthesis around arguments in many cases.


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -