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

com.autonomousapps.internal.analyzer.Language.kt Maven / Gradle / Ivy

There is a newer version: 2.6.1
Show newest version
// 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