android / gradle-recipes
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 77 units with 577 lines of code in units (20.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (94 lines of code)
    • 8 small units (124 lines of code)
    • 65 very small units (359 lines of code)
0% | 0% | 16% | 21% | 62%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
kt0% | 0% | 21% | 17% | 60%
kts0% | 0% | 0% | 34% | 65%
groovy0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
BuildSrc/manifestUpdaterTest0% | 0% | 44% | 0% | 55%
BuildSrc/manifestReplacementTest0% | 0% | 48% | 0% | 51%
BuildSrc/getApksTest0% | 0% | 48% | 0% | 51%
BuildSrc/customizeAgpDslAndVariant0% | 0% | 54% | 0% | 45%
BuildSrc/workerEnabledTransformation0% | 0% | 0% | 62% | 37%
Kotlin/manifestReplacementTest0% | 0% | 0% | 57% | 42%
BuildSrc/testVariantFilteringOnBuildType0% | 0% | 0% | 58% | 41%
BuildSrc/customizeAgpDsl0% | 0% | 0% | 65% | 34%
BuildSrc/customizeAgpDslAndVariantWithConvenientAPI0% | 0% | 0% | 44% | 55%
Kotlin/workerEnabledTransformation0% | 0% | 0% | 73% | 26%
Kotlin/getPublicTxt0% | 0% | 0% | 68% | 31%
BuildSrc/testAsmTransformApi0% | 0% | 0% | 0% | 100%
BuildSrc/setVersionsFromTask0% | 0% | 0% | 0% | 100%
Unclassified0% | 0% | 0% | 0% | 100%
BuildSrc/addBuildTypeUsingDslFinalize0% | 0% | 0% | 0% | 100%
Kotlin/manifestTransformerTest0% | 0% | 0% | 0% | 100%
Kotlin/addCustomFieldWithValueFromTask0% | 0% | 0% | 0% | 100%
Kotlin/addCustomResValueFromTask0% | 0% | 0% | 0% | 100%
Kotlin/bundleTransformerTest0% | 0% | 0% | 0% | 100%
Kotlin/addCustomBuildConfigField0% | 0% | 0% | 0% | 100%
Kotlin/addManifestPlaceholderFromTask0% | 0% | 0% | 0% | 100%
Kotlin/getApksTest0% | 0% | 0% | 0% | 100%
Kotlin/libraryManifestTransformerTest0% | 0% | 0% | 0% | 100%
Kotlin/addCustomResValueField0% | 0% | 0% | 0% | 100%
Groovy/manifestReplacementTest0% | 0% | 0% | 0% | 100%
Groovy/manifestTransformerTest0% | 0% | 0% | 0% | 100%
Kotlin/addCustomManifestPlaceholder0% | 0% | 0% | 0% | 100%
Kotlin/getMappingFile0% | 0% | 0% | 0% | 100%
Kotlin/getAarTest0% | 0% | 0% | 0% | 100%
Kotlin/getBundleTest0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
override fun apply()
in BuildSrc/manifestUpdaterTest/buildSrc/src/main/kotlin/ExamplePlugin.kt
25 1 1
override fun apply()
in BuildSrc/customizeAgpDslAndVariant/buildSrc/src/main/kotlin/ProviderPlugin.kt
23 1 1
override fun apply()
in BuildSrc/manifestReplacementTest/buildSrc/src/main/kotlin/ExamplePlugin.kt
23 1 1
override fun apply()
in BuildSrc/getApksTest/buildSrc/src/main/kotlin/ExamplePlugin.kt
23 1 1
fun taskAction()
in Kotlin/manifestReplacementTest/app/build.gradle.kts
20 1 0
override fun apply()
in BuildSrc/testVariantFilteringOnBuildType/buildSrc/src/main/kotlin/CustomPlugin.kt
17 1 1
override fun apply()
in BuildSrc/customizeAgpDsl/buildSrc/src/main/kotlin/ExamplePlugin.kt
17 1 1
override fun apply()
in BuildSrc/customizeAgpDslAndVariantWithConvenientAPI/buildSrc/src/main/kotlin/ProviderPlugin.kt
15 1 1
override fun apply()
in BuildSrc/workerEnabledTransformation/buildSrc/src/main/kotlin/ExamplePlugin.kt
14 1 1
fun taskAction()
in BuildSrc/workerEnabledTransformation/buildSrc/src/main/kotlin/CopyApksTask.kt
14 1 0
fun taskAction()
in Kotlin/workerEnabledTransformation/app/build.gradle.kts
14 1 0
override fun execute()
in Kotlin/getPublicTxt/lib/build.gradle.kts
13 2 0
override fun apply()
in BuildSrc/customizeAgpDslAndVariantWithConvenientAPI/buildSrc/src/main/kotlin/ConsumerPlugin.kt
10 1 1
override fun apply()
in BuildSrc/customizeAgpDslAndVariant/buildSrc/src/main/kotlin/ConsumerPlugin.kt
10 1 1
override fun apply()
in BuildSrc/testAsmTransformApi/buildSrc/src/main/kotlin/ExamplePlugin.kt
10 1 1
override fun createClassVisitor()
in BuildSrc/testAsmTransformApi/buildSrc/src/main/kotlin/ExamplePlugin.kt
10 2 2
fun taskAction()
in BuildSrc/manifestUpdaterTest/buildSrc/src/main/kotlin/VerifyManifestTask.kt
9 2 0
fun taskAction()
in BuildSrc/manifestReplacementTest/buildSrc/src/main/kotlin/VerifyManifestTask.kt
9 2 0
fun taskAction()
in BuildSrc/setVersionsFromTask/buildSrc/src/main/kotlin/VerifyManifestTask.kt
9 2 0
fun taskAction()
in BuildSrc/getApksTest/buildSrc/src/main/kotlin/VerifyManifestTask.kt
9 2 0