vanniktech / gradle-android-apk-size-plugin

Gradle plugin that generates CSV files with apk size per output and variant of an apk
http://vanniktech.com
Apache License 2.0
84 stars 14 forks source link

[Feature Request] - Do not run the count on each build #67

Closed jaredsburrows closed 7 years ago

jaredsburrows commented 7 years ago

Add an option to the plugin's extension to prevent it from counting after each assembleDebug.

vanniktech commented 7 years ago

What's the use case for this? I also saw that you posted this on the dexcount plugin

jaredsburrows commented 7 years ago

I run gradlew assembleDebug installDebug runDebug. I do not need the dex count plugin and the apk plugin to count after each run.

vanniktech commented 7 years ago

What I do is that I only apply the plugin when I'm on the CI.

jaredsburrows commented 7 years ago

Yeah, I have flags now. Maybe this is not such a big deal. Just a request/suggestion.

vanniktech commented 7 years ago

Basically I've got:

def isOnCI() {
  project.hasProperty('isCI')
}

if (isOnCI()) {
  apply plugin: 'com.vanniktech.android.apk.size'
}

and then on CI I do ./gradlew -PisCI clean build and then I want to know the apk size locally I just use the -PisCI.

jaredsburrows commented 7 years ago

Yes, I use properties as well. I was just making a suggestion.