4

A project that I work on has no-warnings set in the compileOptions. Is there a way to stop Deprecated usages from being flagged as a warning?

I like to use @Deprecated annotations to prevent making too many changes in one merge request, but this prevents me from doing so.

The best scenario is to have Kotlin ignore any @Deprecated annotations within only our application code. Second best thing would be to remove this as a warning entirely.

Thanks!

Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
cody mikol
  • 811
  • 7
  • 21
  • 1
    Possible duplicate of [Kotlin suppress warning deprecated for Android](https://stackoverflow.com/questions/36676512/kotlin-suppress-warning-deprecated-for-android) – user Jul 19 '20 at 19:05
  • 1
    That only shows you how to make a file or class as deprecated. My question is about an entire project. I definitely don't want to add thousands of Suppression annotations to every class. My question is specific to the compiler configuration. – cody mikol Jul 19 '20 at 19:17
  • 1
    You're right. [This](https://stackoverflow.com/questions/52488930/how-to-suppress-specific-kotlinc-javac-compiler-warnings) is somewhat similar but doesn't have any answers, unfortunately – user Jul 19 '20 at 19:22
  • Ah, but that did point me to the overall answer in the comments, thank you! – cody mikol Jul 19 '20 at 19:24
  • Please give a thumbs up on https://youtrack.jetbrains.com/issue/KT-8087, if you're interested in this feature. – TWiStErRob Feb 17 '23 at 12:39

0 Answers0