jenkinsci / gradle-jpi-plugin

Build Jenkins Plugins with Gradle
79 stars 50 forks source link

No support for @Restricted annotations #160

Closed daniel-beck closed 3 years ago

daniel-beck commented 4 years ago

Plugins built with Gradle appear to ignore @Restricted annotations from https://github.com/kohsuke/access-modifier/

This is dangerous as it invites the use of APIs not intended to be used outside core (or plugins) at all, leading to binary compatibility issues when they're changed.

sghill commented 4 years ago

Thanks @daniel-beck, I wasn't aware of this. I agree we should add support for Restricted. It may take some time.

I found these jenkins.io docs and javadoc on types of restrictions. org.kohsuke:access-modifier-checker provides a MOJO that delegates to Checker. I did a quick spike attempting to use Checker but wasn't successful.