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

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

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

import io.appmetrica.gradle.aarcheck.imports.ImportChecker
import org.gradle.api.DefaultTask
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.ListProperty
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.TaskAction

abstract class ImportsCheck : DefaultTask() {
    @get:InputFile
    abstract val aarFile: RegularFileProperty

    @get:Input
    abstract val forbiddenImports: ListProperty

    @TaskAction
    fun check() {
        logger.info("Check forbidden imports in ${aarFile.get()}")
        ImportChecker.check(
            aarFile.get().asFile,
            forbiddenImports.get()
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy