Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def env = System.getProperties()
- if (env['com.android.studio.gradle.project.path'] != null) {
- // build from Android Studio, do magic here
- }
- def sysprops = System.getProperties()
- if (sysprops['idea.platform.prefix'] != null) {
- // Built from AndroidStudio
- } else {
- // Built from command line
- }
- dependencies {
- if (properties.containsKey('android.injected.invoked.from.ide')) {
- implementation 'com.jakewharton:butterknife-reflect:<version>'
- } else {
- implementation 'com.jakewharton:butterknife:<version>'
- kapt 'com.jakewharton:butterknife-compiler:<version>'
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement