DefaultProjectSpec.groovy

Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fixes for previous commit.

  1. … 7 more files in changeset.
Restructure project tree construction so that the containing `ProjectState` for a project is always available, to avoid throwing and then silently ignoring an `IllegalArgumentException` for each project.

Also reuse more project construction logic and remove a bunch of duplicate ad hoc code. This change means that the `ProjectState` object now owns the mutable `Project` object, as was always the intention, rather than existing as a parallel tree. This can continue to evolve so that all access to the mutable project object is mediated by the `ProjectState` that owns it.

  1. … 22 more files in changeset.
Restructure project tree construction so that the containing `ProjectState` for a project is always available, to avoid throwing and then silently ignoring an `IllegalArgumentException` for each project.

Also reuse more project construction logic and remove a bunch of duplicate ad hoc code. This change means that the `ProjectState` object now owns the mutable `Project` object, as was always the intention, rather than existing as a parallel tree. This can continue to evolve so that all access to the mutable project object is mediated by the `ProjectState` that owns it.

  1. … 22 more files in changeset.
Restructure project tree construction so that the containing `ProjectState` for a project is always available, to avoid throwing and then silently ignoring an `IllegalArgumentException` for each project.

Also reuse more project construction logic and remove a bunch of duplicate ad hoc code. This change means that the `ProjectState` object now owns the mutable `Project` object, as was always the intention, rather than existing as a parallel tree. This can continue to evolve so that all access to the mutable project object is mediated by the `ProjectState` that owns it.

  1. … 22 more files in changeset.
Restructure project tree construction so that the containing `ProjectState` for a project is always available, to avoid throwing and then silently ignoring an `IllegalArgumentException` for each project.

Also reuse more project construction logic and remove a bunch of duplicate ad hoc code. This change means that the `ProjectState` object now owns the mutable `Project` object, as was always the intention, rather than existing as a parallel tree. This can continue to evolve so that all access to the mutable project object is mediated by the `ProjectState` that owns it.

  1. … 21 more files in changeset.
Deprecate `ProjectLayout.configurableFiles()` as it is replaced by `ObjectFactory.fileCollection()`. Also replace usages of internal `FileOperations.configurableFiles()` method with the public API.

  1. … 27 more files in changeset.
Deprecate `ProjectLayout.configurableFiles()` as it is replaced by `ObjectFactory.fileCollection()`. Also replace usages of internal `FileOperations.configurableFiles()` method with the public API.

  1. … 27 more files in changeset.
Add a factory method to `ObjectFactory` that can be used to create `ConfigurableFileCollection` instances.

This new method is intended to replace the factory methods on `ProjectLayout`, as `ObjectFactory` is available in all scopes whereas a `ProjectLayout` is only available in project scopes. This also simplifies some task and project extension implementations as now only a single service is required to create the properties.

  1. … 15 more files in changeset.
Add a factory method to `ObjectFactory` that can be used to create `ConfigurableFileCollection` instances.

This new method is intended to replace the factory methods on `ProjectLayout`, as `ObjectFactory` is available in all scopes whereas a `ProjectLayout` is only available in project scopes. This also simplifies some task and project extension implementations as now only a single service is required to create the properties.

  1. … 15 more files in changeset.
Move class generation and instantation infrastructure from core to modelCore project.

  1. … 90 more files in changeset.
Allow the services required by a given class to be queried prior to creating any instances of that class. Use this to allow `ArtifactTransformDependencies` to be injected into artifact transforms using any of the service injection patterns (that is, via a constructor or a getter).

  1. … 127 more files in changeset.
Replace most direct usages of `DirectInstantiator` with indirect usages via `InstantiatorFactory` or test fixtures instead. This means more consistent behaviour in unit tests because the objects under test will behave more similarly to how they do at runtime. This also allows the decision of how the instantiation should behave to live in as few places as possible, so this can be more easily evolved and contextualized.

  1. … 60 more files in changeset.
Some initial support for injecting services into extension constructors. This makes extensions consistent with other kinds of Gradle managed objects, such as tasks, objects created using `ObjectFactory`, plugins and so on.

This commit adds support only for extensions to `Project`. Support for other kinds of extensions will happen later. There is also a bunch of validation missing.

  1. … 12 more files in changeset.
Merge ProtectApiService into CrossProjectConfigurator

  1. … 18 more files in changeset.
Fix CI failures

  1. … 4 more files in changeset.
Add support for URI-backed text resources

This can be used to point tasks like Checkstyle

to a remote, shared configuration file without

having to package it into an archive and using

dependency resolution.

The implementation reuses the same caching logic

we have for remote build scripts.

  1. … 20 more files in changeset.
Add ImmutableFileCollection (#4913)

Add `ProjectLayout.filesFor()` to obtain (immutable) `FileCollection`.

Add `ProjectLayout.mutableFilesFor()` to obtain (mutable) `ConfigurableFileCollection`.

  1. … 7 more files in changeset.
Changed the process forking infrastructure so that it attempts to reuse threads rather than creating 3 or more threads per process that is forked.

There is now a global `ExecFactory` service that manages the infrastructure, including a pool of threads. It provides various factory methods to create instances of `ExecHandleBuilder`, `ExecAction`, `JavaExecHandleBuilder` and `JavaExecAction` backed by this infrastructure.

Replaced all direct instantiation of these types with usages of these factory methods.

  1. … 44 more files in changeset.
Use our own hashing architecture, take 2 (#2817)

This replaces Guava's hashing. We need this for two reasons:

- it allows the addition of custom hash functions, like BLAKE2b which would not be possible with Guava's closed design

- it fixes a few performance issues that Guava only fixes in version 20 (which we can't upgrade to right now, because we still need to support Java 5 in places)

  1. … 159 more files in changeset.
Retain a reference to `buildFile` in `DefaultProject`

Each `DefaultProject` instance already retains a reference to the `buildFile`

via it's `ScriptHandler`. However, accessing `buildFile` in this way is

relatively expensive: this was exposed by a new build operation that is emitted

containing this information. By retaining a direct reference to the `buildFile`

this overhead is avoided.

  1. … 7 more files in changeset.
Fix merge issues

  1. … 22 more files in changeset.
Make zipTrees faster

zipTrees were unpacked every time they were visited,

which meant 2-4 times for every single build.

This changes the logic to snapshot the zip and only unpack

again if it has changed.

  1. … 12 more files in changeset.
Remove `Project#buildscript(Action)`

For good this time. It's of no use outside gradle-script-kotlin and it

makes harder to expose the exact `buildscript` block DSL we want.

  1. … 2 more files in changeset.
Project: remove Action<T> overloads for repositories() and dependencies()

We have to wait for the @HasImplicitReceiver annotation to take effect

before making those changes as the dependencies and repositories

overloads will probably break the included version of

gradle-script-kotlin.

  1. … 2 more files in changeset.
Project: coverage for Action<T> overloads

Move all attribute related code into their own packages

This commit moves all public attribute-related classes to the `org.gradle.api.attributes` package,

and all the internal attribute-related classes to `org.gradle.api.internal.attributes` package.

  1. … 94 more files in changeset.
More consistently include the build identity to the display name for projects and tasks used in various places such as error messages, logging output and tapi progress events.

Added `identityPath` property (for want of a better name) to internal `Gradle`, `Project` and `Task` types for now to allow this to be queried. This path always includes the build identity, and is used to calculate the display name.

Added a bunch of coverage for using `buildSrc` in various nested builds.

    • -0
    • +94
    ./DefaultProjectSpec.groovy
  1. … 23 more files in changeset.