com.autonomousapps.internal.parse.BuildScriptDependenciesRewriter.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dependency-analysis-gradle-plugin Show documentation
Show all versions of dependency-analysis-gradle-plugin Show documentation
Analyzes dependency usage in Android and JVM projects
package com.autonomousapps.internal.parse
import com.autonomousapps.internal.advice.AdvicePrinter
import com.autonomousapps.internal.advice.DslKind
import com.autonomousapps.model.Advice
import java.io.File
internal interface BuildScriptDependenciesRewriter {
fun rewritten(): String
companion object {
fun of(
file: File,
advice: Set,
advicePrinter: AdvicePrinter,
reversedDependencyMap: (String) -> String = { it },
): BuildScriptDependenciesRewriter {
val dslKind = DslKind.from(file)
val filePath = file.toPath()
return when (dslKind) {
DslKind.KOTLIN -> KotlinBuildScriptDependenciesRewriter.of(filePath, advice, advicePrinter, reversedDependencyMap)
DslKind.GROOVY -> GroovyBuildScriptDependenciesRewriter.of(filePath, advice, advicePrinter, reversedDependencyMap)
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy