From c76d419ecb3ee9f0bd673d7c1be765fe4d5dff54 Mon Sep 17 00:00:00 2001 From: ameba23 Date: Mon, 6 Sep 2021 12:27:57 +0200 Subject: [PATCH] Tell animal sniffer gradle plugin to ignore java.util.Objects --- bramble-core/build.gradle | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bramble-core/build.gradle b/bramble-core/build.gradle index b244d4349..0dbd06e24 100644 --- a/bramble-core/build.gradle +++ b/bramble-core/build.gradle @@ -31,6 +31,14 @@ dependencies { signature 'org.codehaus.mojo.signature:java16:1.1@signature' } +animalsniffer { + // Allow requireNonNull: Android desugaring rewrites it (so it's safe for us to use), + // and it gets used when passing method references instead of lambdas with Java 11. + // Note that this line allows *all* methods from java.util.Objects. + // That's the best that we can do with the configuration options that Animal Sniffer offers. + ignore 'java.util.Objects' +} + // needed to make test output available to bramble-java configurations { testOutput.extendsFrom(testCompile)