Related issue: gradle/gradle#19960
TestNG 7.x removed the TestNG#setConfigFailurePolicy(String) method in favor of TestNG#setConfigFailurePolicy(org.testng.xml.XmlSuite$FailurePolicy) (an enum argument).
Older (pre-5.12) TestNG libraries did not have this method at all