I have an Android Studio module called app. I have another library module called library.
Inside library, i have some packages, like manager or network. The package manager contains a class called SPManager with a static method storeSP()
package com.example.library.manager;
public class SPManager {
______ static void storeSP(){...}
}
Is it possible make storeSP() accessible only within my library module? If i choose package-private (no access modifier), I cannot access it from my network package in the same module. If I choose public, then this method is also accessible from other modules.
Thanks in advance!
internal
, so consumers of the library are at least aware the API in those classes is internal and might change. Curiously enough, kotlin adds the modifierinternal
, which does exactly what you want.