com.github.ozsie.StringExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of detekt-maven-plugin Show documentation
Show all versions of detekt-maven-plugin Show documentation
A maven plugin wrapper for detekt cli
The newest version!
package com.github.ozsie
import org.apache.maven.model.Plugin
import java.io.File
internal fun StringBuilder.buildPluginPaths(plugins: ArrayList, mdp: Plugin, root: String) {
plugins.forEach { plugin ->
if (File(plugin).exists()) {
append(plugin).append(SEMICOLON)
} else {
mdp.dependencies
?.filter { plugin == it.getIdentifier() }
?.forEach { append(it asPath root).append(SEMICOLON) }
}
}
}
internal fun String.asPath() = replace(DOT, SLASH)