Skip to content

Instantly share code, notes, and snippets.

@Krylez-zz
Created March 18, 2014 23:31
Show Gist options
  • Save Krylez-zz/9632226 to your computer and use it in GitHub Desktop.
Save Krylez-zz/9632226 to your computer and use it in GitHub Desktop.
Generating a third-party license report in Android Studio
ext {
PATH_TO_SCRIPT = '../scripts/collect_licenses.py'
PATH_TO_SOURCE_ROOT = 'src'
PATH_TO_ANOTHER_SOURCE_ROOT = '../libraries/MyLibrary/src'
}
task generateLicenseReport(type:Exec) {
def script = file(PATH_TO_SCRIPT)
def sourceRoot = file(PATH_TO_SOURCE_ROOT)
def anotherSourceRoot = file(PATH_TO_ANOTHER_SOURCE_ROOT)
standardOutput = file('src/main/assets/licenses.html').newOutputStream()
commandLine 'python', script.absolutePath,
sourceRoot.absolutePath, anotherSourceRoot.absolutePath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment