DefaultConfigurableFileTreeTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Move file collection APIs out of core (#6525)

This change breaks out code that directly relates to handling `FileCollection`s and their build dependencies (called `TaskDependency` at this time) into a separate subproject (`:files`). This is so that other modules can build on just this module instead of having to depend on the oversized `:core`.

As part of the change `Provider`s have been moved to `:base-services`. In a possible followup step `:base-services` could be split into a module that captures the very basic concepts of Gradle's data model: it's all about `DomainObjectCollection`s that can be configured via `Action`s, transformed via `Transformer`s, lazyness can be provided via `Provider`s and rich mutable data types can be created via `Property` objects.

Another addition to `:base-serivces` is the directed graph traversal algorithms used in many parts of Gradle.

    • -323
    • +0
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 443 more files in changeset.
Convert test from JMock to Spock

    • -134
    • +117
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 2 more files in changeset.
Remove FileCollection.stopExecutionIfEmpty()

#6269

    • -43
    • +48
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 5 more files in changeset.
Remove deprecated constructors on DirectoryFileTree (#1776)

    • -1
    • +2
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 22 more files in changeset.
Fix NPE when configuring FileTree's builtBy by map (#626)

- `fileTree(dir: 'classes', builtBy: ['compile'])` is valid, and should not break

    • -1
    • +2
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 1 more file in changeset.
Use a factory to create `DirectoryFileTree` instances, to avoid exposing the dependencies of `DirectoryFileTree` to its consumers.

This is only partially done, there are quite a few other places where this is not used.

    • -10
    • +10
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 23 more files in changeset.
Manage creation of most PatternSet instances

- use managed CachingPatternSpecFactory instance for

these PatternSet instances

+review REVIEW-5627

    • -3
    • +15
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 37 more files in changeset.
Renamed FileCollectionContainer.resolve() to visitContents()

    • -2
    • +2
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 25 more files in changeset.
Initializing native services for more broken tests

+review REVIEW-5378

    • -0
    • +2
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 22 more files in changeset.
Inject some services into the various FileTreeElement implementations rather than reach across to FileSystems.default.

    • -7
    • +5
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 29 more files in changeset.
Inject FileCopier into DefaultConfigurableFileTree.

    • -12
    • +9
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 9 more files in changeset.
Remove @author tags and names from source code.

- Added checkstyle check for @author

- Added not to CONTRIBUTING.md saying that we don't use names in the codebase

    • -3
    • +0
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 1213 more files in changeset.
Fix case of DuplicationStrategy enum, relying on DSL type coercion to allow user to specify value as lower case string.

This implies exposing enhanced objects as part of the CopySpec DSL. At this point, this is not comprehensive. That is coming in a subsequent commits.

    • -6
    • +8
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 32 more files in changeset.
Some renaming and cleanup around the test/temp directory used in tests.

    • -3
    • +4
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 308 more files in changeset.
- Fixed case where duplicate source directories were added to eclipse project when the java source directory was also configured as a resource directory. - Changed SourceSet.allJava, allGroovy, allScala and allSource to return a SourceDirectorySet instead of a generic FileTree. Removed code from ide plugins which reached into the implementation types for these properties, and use the api instead. This will later allow us to have per-directory include/excludes, and allow arbitrary file collections to be added to source sets.

    • -1
    • +1
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 40 more files in changeset.
- Added from property to ConfigurableFileCollection, to match the from() method. - Introduced FileCollectionInternal and FileTreeInternal. - Changed DefaultConfigurationFileCollection and DefaultConfigurableFileTree to only add dependency if at least one has been specified.

    • -2
    • +29
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 23 more files in changeset.
- Changed CompositeFileCollection to implement FileCollectionContainer, so that it is now possible to inspect the contents of a FileCollection, for example, to cache file snapshots - Inlined SingletonFileTree into DefaultFileCollectionResolveContext. - Use better display names/toString() output for some FileCollection implementations

    • -10
    • +1
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 26 more files in changeset.
- Renamed PathResolvingFileCollection to DefaultConfigurableFileCollection and moved into o.g.api.internal.file.collections package - Moved DefaultConfigurableFileTree into o.g.api.internal.file.collections package

    • -0
    • +306
    ./DefaultConfigurableFileTreeTest.groovy
  1. … 24 more files in changeset.