Gradle assemble command is calling the run task

gradle assemble in gradle task option in eclips is internally calling the run task.
in, I have mentioned below task

run {
args “${argv1}”
args “${argv2}”
systemProperties[‘app.configuration’] = ‘’
systemProperties[‘rfa.configuration’] = ‘’
systemProperties[‘log4j.debug’] = ‘true’
systemProperties[‘log4j.configuration’] = ‘’
assemble task is expecting the arguments. But for assemble why it is expecting the program arguments.

Is there any other way to define the using the gradle configuration
I know program argument can be passed -Pargv1=NIP -Pargv2=EUROPE like this in the program arguments.

args "${argv1} is executed by Gradle during its configuration phase, not when the run task is executed.

You could do:

run {
    if( project.hasProperty( 'argv1' ) ) {
        args "${argv1}"