com.autonomousapps.internal.analyzer.Language.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
// Copyright (c) 2024. Tony Robalik.
// SPDX-License-Identifier: Apache-2.0
package com.autonomousapps.internal.analyzer
import org.gradle.api.Action
import org.gradle.api.tasks.util.PatternFilterable
internal enum class Language(val pattern: String) {
GROOVY("**/*.groovy"),
JAVA("**/*.java"),
KOTLIN("**/*.kt"),
SCALA("**/*.scala"),
XML("**/*.xml"),
;
companion object {
fun filterOf(language: Language): Action = Action {
Language.values().forEach {
when (it) {
language -> include(it.pattern)
else -> exclude(it.pattern)
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy