Reputation: 2220
I am creating an Android library, and I would like to create a distributable jar without revealing source code. The library does not use resources like layouts, images, etc. I understand that I can just copy the .jar automatically generated in the bin folder of an Eclipse Android project if I check 'is Library' under project properties.
Is there anything else I should be aware of? How does the client project know which permissions my library requires. Should I include those permissions in the Manifest of my library?
Upvotes: 0
Views: 178
Reputation: 1006664
I understand that I can just copy the .jar automatically generated in the bin folder of an Eclipse Android project if I check 'is Library' under project properties.
I wouldn't, as you don't know how that JAR was created, and you don't know how that JAR might change as the tools change. That JAR is a side-effect of Android's internal build process and is not designed to be a production artifact. Create your own production JAR yourself (e.g., Ant <jar>
task).
How does the client project know which permissions my library requires.
You tell them via well-written documentation.
Should I include those permissions in the Manifest of my library?
Since your JAR does not contain your manifest, that will not help.
Upvotes: 1