Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. def env = System.getProperties()
  2. if (env['com.android.studio.gradle.project.path'] != null) {
  3. // build from Android Studio, do magic here
  4. }
  5.  
  6. def sysprops = System.getProperties()
  7. if (sysprops['idea.platform.prefix'] != null) {
  8. // Built from AndroidStudio
  9. } else {
  10. // Built from command line
  11. }
  12.  
  13. dependencies {
  14. if (properties.containsKey('android.injected.invoked.from.ide')) {
  15. implementation 'com.jakewharton:butterknife-reflect:<version>'
  16. } else {
  17. implementation 'com.jakewharton:butterknife:<version>'
  18. kapt 'com.jakewharton:butterknife-compiler:<version>'
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement