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

Add teamcity support #87

Closed hoeggi closed 6 years ago

hoeggi commented 6 years ago

I added support for automatic teamcity statistics and visualization so it's easier to track size across builds. It's configuarable and defaults to disabled.

codecov[bot] commented 6 years ago

Codecov Report

Merging #87 into master will decrease coverage by 4.52%. The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #87      +/-   ##
============================================
- Coverage     67.85%   63.33%   -4.53%     
  Complexity       18       18              
============================================
  Files             4        4              
  Lines            56       60       +4     
  Branches         11       14       +3     
============================================
  Hits             38       38              
- Misses            3        5       +2     
- Partials         15       17       +2
Impacted Files Coverage Δ Complexity Δ
...om/vanniktech/android/apk/size/ApkSizeExtension.kt 66.66% <0%> (-33.34%) 2 <0> (ø)
...lin/com/vanniktech/android/apk/size/ApkSizeTask.kt 44% <0%> (-6%) 7 <0> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 89f82f7...c644b96. Read the comment docs.

hoeggi commented 6 years ago

I updated the code and also added some dokumentaion in code and in the readme. There is an overview with a screenshot here https://confluence.jetbrains.com/display/TCD10/Statistic+Charts

Since I'm not using it long enough for my builds my graph looks kind of boring :)

I got the basic idea for this from the dexcount plugin here https://github.com/KeepSafe/dexcount-gradle-plugin and they both make for some nice longime reporting.

hoeggi commented 6 years ago

Not sure yet if it's possible to see if teamcity is detectable but i try to figure it out.

hoeggi commented 6 years ago

Ok i found it, according to this https://confluence.jetbrains.com/display/TCD10/Predefined+Build+Parameters there should be a property teamcity.version exactly for this usecase.

I see if i can make this work with this.

vanniktech commented 6 years ago

Can't we just use the environment variable? TEAMCITY_VERSION