I have met a mention of some sort of label, possibly an annotation, which does not allow for a release. It is used in order not to forget to correct the necessary places in the code.

Tell me what it is and how to turn it on?

  • And what exactly is the abstract? In my opinion, you can make it so that if lint finds some errors, then do not collect the project - pavel163
  • @ pavel163 I found. this is done by lint, see the answer below. - tse

1 answer 1

Set Android Studio to //STOPSHIP when building if the code contains //STOPSHIP . To enable lint checking for //STOPSHIP , add to your build.gradle

 android { ... lintOptions { abortOnError true fatal 'StopShip' } } 

If you have // ​​STOPSHIP comments in the code, the release build will not build. In addition, you can also enable highlighting of such comments in Android Studio (disabled by default). Preferences → Editor → Code Style → Inspections. Look for STOPSHIP in the search and check the box for highlighting.

Source: https://habrahabr.ru/post/319562/

  • 2
    Live and learn! You should have heard my knocked jaws :) - Barmaley
  • Another option suggested: github.com/Stuie/papercut - tse