I'm creating a .aar module that's dependent on another .aar file.
I'm adding the dependency to the project in my gradle file like so:
debugApi(group: 'com.mydomain.mylib', name: 'anotherlib-debug', version: '1.0', ext: 'aar') {
transitive=true
}
releaseApi(group: 'com.mydomain.mylib', name: 'anotherlib-release', version: '1.0', ext: 'aar') {
transitive=true
}
The transitive=true
doesn't seem to be working because when I build my .aar file the dependencies aren't included.
I have 2 questions:
1. How can I include the dependency .aar files so they build into my modules .aar file?
2. Can I build my modules .aar file so it doesn't expose the dependency .aar api in whatever project uses it? . That is, I would like to prevent someone who's using my module in their project from directly accessing the api from the dependency .aar file. I would like to only let them use the api I create that wraps or uses the dependency.