danger-android_permissions_checker
A Danger plugin to check diff of android apk permissions.
Installation
gem install danger-android_permissions_checker
How to check
Check permissions between current permissions and apk generated on CI service. If changed, show permissions which added or deleted.
Usage
Create current permission list file of your apk using aapt, like this.
aapt d permissions /path/to/apk > permissions.txt
Add this to Dangerfile. Specify APK generated by CI service and permission list file generated by above command.
android_permissions_checker.check(
apk: '/path/to/generated_apk_by_CI',
permission_list_file: '/path/to/permissions.txt'
)
To use specific report method (default is warn). Available options are: message, warn, fail.
android_permissions_checker.report_method = 'fail'
android_permissions_checker.check(
apk: '/path/to/generated_apk_by_CI',
permission_list_file: '/path/to/permissions.txt'
)
NOTE
This gem uses aapt
command to parse permissions of generated apk, so you need to add /path/to/aapt (Android Build-tools) to $PATH on your CI service.
ChangeLog
See ChangeLog.md.
Development
- Clone this repo
- Run
bundle install
to setup dependencies. - Run
bundle exec rake spec
to run the tests. - Make your changes.