Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Move some `FileTree` construction behind a factory interface.

    • -6
    • +11
    ./org/gradle/api/file/FileVisitorUtil.groovy
  1. … 15 more files in changeset.
Fix exec factory instantiation in global scope

  1. … 3 more files in changeset.
Move JavaModuleDetector service to build session scope

This makes modular classpath handling available to more Gradle

infrastructure which itself runs on the JVM. In particular

the execution service (project.javaexec {}) can support running

modules through this.

  1. … 10 more files in changeset.
Add JavaModuleDetector service

A service that analyses JAR files, class and source folders to

determine if they represent a Java module. It caches the result

of the analysis of jar and class files.

It has as similar structure as AnnotationProcessorDetector.

  1. … 3 more files in changeset.
Attach producer task information to `Property` properties annotated with output annotations and attached to `@Nested` objects.

  1. … 22 more files in changeset.
Force AbstractTestDirectoryProvider to use Class (#12431)

Closes https://github.com/gradle/gradle-private/issues/2988

This PR adds `className` to `AbstractTestDirectoryProvider` so there'll be no more `unknown-test-class`.

  1. … 407 more files in changeset.
Remove `FileResolver.getPatternSetFactory()` as this was only used to carry around the factory service and never used by the resolvers themselves. Instead, pass the factory around as a service.

  1. … 50 more files in changeset.
Move instantiation of the various Property instances behind a factory interface.

  1. … 18 more files in changeset.
Implement `disallowUnsafeReads()` for `ConfigurableFileCollection` implementations.

  1. … 22 more files in changeset.
Add `HasConfigurableValue.disallowUnsafeRead()` to allow plugins to switch lazy instances to 'strict' behaviour wrt reads.

In this commit, a strict `Property` disallows reads until the owning project's `afterEvaluate` starts. This is not implemented for `FileCollection` yet.

  1. … 34 more files in changeset.
Fix tests that were using file ops on Project in scripts under test

project.file(), project.fileTree(),

project.copy(), project.sync(),

project.delete(), project.mkdir(),

etc..

replaced by using public services ObjectFactory, ProjectLayout,

FileSystemOperations, and direct Java/Groovy/Kotlin API stdlib usage

for mkdirs() or creating new File instances.

or simply by capturing just the File instances when possible.

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 17 more files in changeset.
Initial support for unique lockfile per project

With a feature preview, Gradle now supports reading from a unique

lockfile per project.

If the support is enabled and the unique lockfile has no lock

information for a locked configuration, Gradle attempts to read the

configuration specific lockfile in case it exists.

Issue #11881

  1. … 9 more files in changeset.
Fix deserialization of `Directory` instances from the instant execution cache so that they use the correct base directory to resolve files and directories.

  1. … 15 more files in changeset.
Simplify the implementation of `GeneratedSingletonFileTree`.

  1. … 25 more files in changeset.
Fix mapping the contents of a `FileTree` that contains a file (rather than a directory) as a root to an Ant `FileSet`.

This fixes the Checkstyle task when source files are added directly to the task sources.

  1. … 14 more files in changeset.
Replace several more usages of direct `FileCollection` implementation instantiation with a factory method.

Remove/deprecate a couple of `FileCollection` implementations, as these can now be replaced with public API factory methods instead.

The deprecation is intended to be tempory, until the play plugin can be updated to use public APIs instead, then the implementation will be removed.

  1. … 45 more files in changeset.
Serialize more details of the project hierachy to the instant execution cache, so that each project's project directory is correct.

Also correctly recreate the project hierarchy. Previously some projects would not be connected to their parent project.

  1. … 18 more files in changeset.
Properly isolate tests from the Gradle user home

When running Gradle, we use the current working directory as the

base directory for searching a `settings.gradle` file. For tooling

API tests this working directory is the one of Gradle itself, which

causes a number of issues because the root directory of the project

doesn't match the working directory.

Therefore, Gradle finds the `settings.gradle` file of its own build,

instead of finding the one in the test.

As a workaround, TAPI tests now use an action which will set the

working directory to the test directory, which should cover most

cases. Additional cases like missing settings files in projects

under tests have to be handled separately, as demonstrated in this

commit for the ProjectBuilder test.

  1. … 6 more files in changeset.
Change the `JavaInstallationRegistry` API to represent the installation directory using `Directory` and `Provider<Directory>` instead of `File`.

  1. … 7 more files in changeset.
Introduce a checksum file cache service

This service is responsible for caching the checksums computed from

local file system. Because it's also used for dependency verification

writing and checking, this cache uses the existing infrastructure which

makes sure that if a file is updated locally, we expire the entry in

the cache.

This is done because there are lots of places in the code where we

used the legacy `HashUtil` class, which has no caching whatsoever.

It's, however, quite common to have a build which generates sha1

checksums multiple times for the same file. For example, during

publication.

  1. … 102 more files in changeset.
Fix `DefaultProviderFactory` instantiation in `TestUtil`

Ensure that the implementation hash for a task defined in a Groovy DSL build script is the same when the task is deserialized from the instant execution cache as when it was serialized to cache.

Previously, a task defined in a Groovy DSL script was always treated as out-of-date when first deserialized from the instant execution cache.

  1. … 8 more files in changeset.
Desugar producer attribute if the requesting attribute is desugared (#11372)

This can be the case if an attribute on a dependency is published

and the resolved target of the dependency is a local project.

For example, a published platform dependency to a local java-platform

project.

We support 'Named' and 'Enum' for desugaring as that are the only

non-primitve types we currently allow to be published in Gradle

Module Metadata.

    • -1
    • +2
    ./org/gradle/util/SnapshotTestUtil.groovy
  1. … 3 more files in changeset.
Add static import for CaseSensitivity.*

  1. … 8 more files in changeset.
Pass CaseSensitivity to DefaultVirtualFileSystem

for better readability.

  1. … 4 more files in changeset.
Merge 'shared resources' into 'build services', so that each service can optionally have a maximum number of concurrent usages defined.

When scheduling tasks, Gradle will not start a task that uses a build service when there are already the maximum number of tasks already running for that service.

    • -15
    • +20
    ./org/gradle/util/TestUtil.groovy
  1. … 21 more files in changeset.
Use case-insensitive matching on case insensitive FS

Only searching for snapshots is respecting the case sensitivity, the

other methods currently don't.

  1. … 16 more files in changeset.
Add properties on `Report` and subtypes to allow wiring using `Providers`. Specifically, add `Report.activated` to replace `enabled` and `outputLocation` to replace destination.

Change the Java base plugin to use these properties instead of convention mapping to attach conventions for the test report locations.

  1. … 25 more files in changeset.
Use AtomicReference for root

No need to use a full executor service.

  1. … 5 more files in changeset.
Use single-threaded access for VFS mutation

  1. … 5 more files in changeset.