The current implementation of ApiLogger::setLevel is to throw an UnsupportedOperation Exception.
It turns out that Gradle's internal logging tries to call this method under some configurations, and it cannot deal gracefully with that Exception, so the build fails.
mattsicker I was wondering if there is any reason why the implementation could not be like this: I will try this in a test project.
(5 minutes later...) Looking at
LOG4J2-1110, I understand that this can be done in CoreLogger but not in ApiLogger.
Still, would it be possible to silently ignore this call to setLevel, rather than throwing an UnsupportedOperationException?