I am working on the development of an android library with confidential APIs. I want to publish the library and make it publicly accessible but cannot open-source the code.
Is there any software or a way to publish the library while keeping the code private?
I can use jitpack with private repo but that is paid. Is there any alternative / free solution?
one of the solutions you're looking for is obfuscating. see this related question: android library project obfuscation
and also here: Setting up ProGuard with Android Library Projects
when you obfuscate your code it is still open to be read by others, but it changes some way that is not readable by human.