Reputation: 1423
I have created an Android
library for customer, which is stored in private repository (it can be Github or Bitbucket, does not matter). And now this library should be published to mavenCentral for future use by other programmers. And there are two important requirements:
How can I make this? I found many tutorials for mavenCentral, but all of them was only for public repos.
Upvotes: 10
Views: 3115
Reputation: 106
I am kind of facing some similar issue. However, I liked the idea in this link below:
https://medium.com/student-beans/publishing-a-library-as-a-aar-package-55ed725fa638
Create .aar file -> Create new repo -> Upload your .aar file to Github directly -> Create release version -> Distribute using Jitpack.
This way people can directly use your library without having to see the implementation.
Suggestion: If you want it to be more secure, I would recommend creating a separate account for AAR distribution. Make the AAR repo private and distribute Github token to your partner companies only. (This is just a suggestion and I have not yet tested it)
Update: Please follow the below tutorial as the above reference is not fully working.
https://www.talentica.com/blogs/publish-your-android-library-on-jitpack-for-better-reachability/
Take the jitpack.yml file from the first article and add it to your GitHub project along with the 3 generated files from the above tutorial.
Upvotes: 3
Reputation: 726
Some options to host private maven repos are Sonatype Nexus or Jfrog both of which offer free options as well as paid enterprise plans depending on your requirements.
There are a lot of online tutorials on how to upload private repos to these solutions. For example this blog post covering nexus setup.
Upvotes: 2
Reputation: 76
1.you can use private repo like https://mymavenrepo.com/ and enable
Read: HTTP Basic Auth
2.All parts of the code except library Api can be obfuscated
3.Depending on the repo you use, it is possible
I hope it is useful
Upvotes: 2