ru.tinkoff.plugins.buildmetrics.android.metrics.AndroidDexMetricsFactory.kt Maven / Gradle / Ivy
package ru.tinkoff.plugins.buildmetrics.android.metrics
import ru.tinkoff.plugins.buildmetrics.api.metrics.Metric
import ru.tinkoff.plugins.buildmetrics.android.utils.ApkAnalyzer
import ru.tinkoff.plugins.buildmetrics.android.utils.ApkAnalyzerImpl
import ru.tinkoff.plugins.buildmetrics.android.utils.findApkFiles
import ru.tinkoff.plugins.buildmetrics.api.factories.Factory
import java.io.File
/**
* Metrics:
* - application_package_methods_count - methods count in dex-files;
* - file_name - label with file name;
*
* Required:
* - [apkanalyzer](https://developer.android.com/studio/command-line/apkanalyzer) (must be accessible via `PATH`);
*/
class AndroidDexMetricsFactory(
private val apkLocations: List,
private val apkAnalyzer: ApkAnalyzer = ApkAnalyzerImpl(),
) : Factory.Metrics {
override fun create(): List> = androidDexMetrics(
apkFiles = findApkFiles(files = apkLocations),
apkAnalyzer = apkAnalyzer,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy