All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.tinkoff.plugins.buildmetrics.android.metrics.AndroidAabMetricsFactory.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.BundleTool
import ru.tinkoff.plugins.buildmetrics.android.utils.BundleToolImpl
import ru.tinkoff.plugins.buildmetrics.android.utils.findAabFiles
import ru.tinkoff.plugins.buildmetrics.api.factories.Factory
import java.io.File

/**
 * Metrics:
 * - application_package_size_bytes - min & max download sizes of bundle;
 *     - file_name - label with file name;
 *     - size_type - size type (`min` or `max`);
 *
 * Required:
 *  - [bundletool](https://developer.android.com/studio/command-line/bundletool) (must be accessible via `PATH`);
 */
class AndroidAabMetricsFactory(
    private val aabLocations: List,
    private val bundleTool: BundleTool = BundleToolImpl(),
) : Factory.Metrics {

    override fun create(): List> = androidAabMetrics(
        aabFiles = findAabFiles(files = aabLocations),
        bundleTool = bundleTool,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy