Sunday, 11 November 2018

RestrictTo not restricting usage of restricted method

I have annotated one of my library project's method as restricted @RestrictTo(Scope.LIBRARY) even tried @RestrictTo(Scope.LIBRARY_GROUP) but this not prevent the APIs from being used in the other modules of the project. I have even tried setting group=xxx and group=yyy in both modules.

enter image description here

Restricting API call

enter image description here

No error/warning shown by the Android Studio.

enter image description here Event lint is enabled for Restricted APIs.

I have even tried running lint on the caller module using ./gradlew lint

Not sure what is wrong here please help.



from RestrictTo not restricting usage of restricted method

No comments:

Post a Comment