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

io.appmetrica.gradle.aarcheck.tasks.DependenciesDump.kt Maven / Gradle / Ivy

The newest version!
package io.appmetrica.gradle.aarcheck.tasks

import io.appmetrica.gradle.aarcheck.agp.AndroidLibraryVariant
import io.appmetrica.gradle.aarcheck.dependencies.DependenciesExtractor
import org.gradle.api.DefaultTask
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.TaskAction

abstract class DependenciesDump : DefaultTask() {
    @get:Internal
    abstract val androidLibraryVariant: Property

    @get:OutputFile
    abstract val dependenciesDumpFile: RegularFileProperty

    @TaskAction
    fun dump() {
        logger.info("Dump dependencies for ${androidLibraryVariant.get().name}")

        dependenciesDumpFile.get().asFile.writeText(
            DependenciesExtractor.extract(androidLibraryVariant.get())
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy