Skip to content

Commit

Permalink
Convert DependencyFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Nov 5, 2024
1 parent 9f70c6b commit 664b2fd
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 75 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.github.jengelman.gradle.plugins.shadow.internal

import groovy.lang.Closure
import org.gradle.api.artifacts.Dependency
import org.gradle.api.artifacts.ResolvedDependency
import org.gradle.api.file.FileCollection
import org.gradle.api.specs.Spec

public interface DependencyFilter {
/**
* Resolve a FileCollection against the include/exclude rules in the filter.
*/
public fun resolve(configuration: FileCollection): FileCollection

/**
* Resolve all FileCollections against the include/exclude ruels in the filter and combine the results.
*/
public fun resolve(configurations: MutableCollection<FileCollection>): FileCollection

/**
* Exclude dependencies that match the provided spec.
*/
public fun exclude(spec: Spec<in ResolvedDependency>): DependencyFilter

/**
* Include dependencies that match the provided spec.
*/
public fun include(spec: Spec<in ResolvedDependency>): DependencyFilter

/**
* Create a spec that matches the provided project notation on group, name, and version.
*/
public fun project(notation: Map<String, *>): Spec<in ResolvedDependency>

/**
* Create a spec that matches the default configuration for the provided project path on group, name, and version.
*/
public fun project(notation: String): Spec<in ResolvedDependency>

/**
* Create a spec that matches dependencies using the provided notation on group, name, and version.
*/
public fun dependency(notation: Any): Spec<in ResolvedDependency>

/**
* Create a spec that matches the provided dependency on group, name, and version.
*/
public fun dependency(dependency: Dependency): Spec<in ResolvedDependency>

/**
* Create a spec that matches the provided closure.
*/
public fun dependency(spec: Closure<*>): Spec<in ResolvedDependency>
}

This file was deleted.

0 comments on commit 664b2fd

Please sign in to comment.