void (@NotNull String text, boolean stdOut) { if (text.contains("This is scheduled to be removed in Gradle")) { deprecationTextLineCount = 15; } if (deprecationTextLineCount > 0) { deprecationTextBuilder.append(text); deprecationTextLineCount--; if (deprecationTextLineCount == 0) { deprecationError.set(Couple.of("Deprecation warning from Gradle", deprecationTextBuilder.toString())); deprecationTextBuilder.setLength(0); } } super.printOutput(text, stdOut); }