When I tried to pass a Gradle property which has a class
setThreadCount of the TestNG provider, I received a following error Could not find method setThreadCount() for arguments  on object of type org.gradle.api.tasks.testing.testng.TestNGOptions.
This error didn’t help me figure out what was wrong with my build script. I tried reading
--stacktrace outputs, but neither mentioned a type conversion error, or anything similar. And so I was puzzled why
def t_threads = 1 ... setThreadCount(t_threads) worked, but 'def t_threads = test_threads … setThreadCount(t_threads)
is a property came fromgradle.properties` didn’t.