Interface FileSpec

All Known Implementing Classes:
DependencyFileSpec, LocalFileSpec, MavenFileSpec

@Experimental public interface FileSpec
FileSpec should be used in MappingsSpec's that take an input file. The input file can either be a local file or a gradle dep.
  • Method Details

    • create

      static FileSpec create(Object o)
      Creates a file spec.

      The parameter will be evaluated like this:

      • File, Path and FileSystemLocation will be resolved as local files
      • Provider (including Property will recursively be resolved as its current value
      • CharSequence (including String and GString) will be resolved as Maven dependencies
      • Dependency will be resolved as any dependency
      Parameters:
      o - the file notation
      Returns:
      the created file spec
    • createFromMavenDependency

      static FileSpec createFromMavenDependency(String dependencyNotation)
    • createFromDependency

      static FileSpec createFromDependency(org.gradle.api.artifacts.Dependency dependency)
    • createFromFile

      static FileSpec createFromFile(File file)
    • createFromFile

      static FileSpec createFromFile(org.gradle.api.file.FileSystemLocation location)
    • createFromFile

      static FileSpec createFromFile(Path path)
    • createFromFile

      static FileSpec createFromFile(org.gradle.api.file.RegularFileProperty regularFileProperty)
    • get

      Path get(MappingContext context)