Using Android Gradle plugin 0.7.0 with the following build.gradle
:
buildscript {
repositories {
mavenCentral()
}
dependenci
If you want to do your part as developer, utilizing open source libraries, you should try including all those open source licenses within your apk
. To do this, you can use the merge method in your packagingOptions
.
Example:
packagingOptions {
// This will get include every license and notice regardless of what dir it’s in.
merge '**/LICENSE.txt'
merge '**/NOTICE.txt'
merge '**/notice.txt'
merge '**/license.txt'
merge '**/NOTICE'
merge '**/LICENSE'
merge '**/notice'
merge '**/license'
merge '**/LGPL2.1'
// This will exclude any README files, regardless of the dir or the file type.
exclude '**/README.*'
}
This answer is better than using pickFirst
because that method only picks the first license it finds and disregards all the rest, kinda rendering it useless in this case.
So in short, use the merge
method to include all those licenses from those kickass open source libraries you’ve been using.
More info on Gradle
PackagingOptions.