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

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -