How to skip deprecation warnings

In our plugins we use classes which use Gradle 1.5 syntax in their methods and they are deprecated in 1.7 . We can’t fix their code because it is external for us but when the we start our build deprecation messages are thrown. I know that these warnings extends error, but in Gradle 1.7 is there way to skip them? Thanks.

There’s no public API for disabling deprecation messages unfortunately.

There is an internal API though:

org.gradle.util.SingleMessageLogger.whileDisabled {
  apply plugin: "some-plugin"

Note that this is internal API. It may change at any time without notice.

Problem I add this code in my plugin which is java code. When I pass an action

org.gradle.util.SingleMessageLogger.whileDisabled(new Action<Project>()) {
   public void execute(Project rootProject) {

But error is thrown

method SingleMessageLogger.whileDisabled(Runnable) is not applicable
      (actual argument <anonymous Action<Project>> cannot be converted to Runnable by method
 invocation conversion)

How to deal with that?

Because the method takes a Runnable, and an Action is not a Runnable.

oooo Sorry I saw action and wrote new Action. Thanks again.