Passing properties via the command line

If suppose I pass any property via command line and if there exist the same property in build.gradle file then would command-line property overrides the property value in build.gradle?

Yes, that is how it works. Properties on the command line override all others.

The configuration is applied in following order (if an option is configured in multiple locations the last one wins):

from in project build dir.
from in gradle user home.
from system properties, e.g. when is set on the command line.