Gradle task rules newbie question

Hi, new to Gradle…I have created a task that runs successfully but I ended up having to pass several parameters using the -Parg1=arg1-value paradigm to make the task generic enough to be useful. I then read in Gradle docs that Sometimes you want to have a task whose behavior depends on a large or infinite number value range of parameters. A very nice and expressive way to provide such tasks are task rules. I understand and I really like the example of pingServer1…but in my case, I have several parameters I need to pass. Is rules a better option than parameter passing? If so, is there an example that uses rules with multiple parameters (or maybe a different way) that I can look at?

Thank you for any help and guidance.