Clone Tools
  • last updated a few seconds ago
Constraints: committers
Constraints: files
Constraints: dates
Refine gradleApi() filtering for optional Kotlin DSL

by relying on classpath registry instead of hardcoded filtering

Signed-off-by: Paul Merlin <>

  1. … 3 more files in changeset.
Allow finding projects in included build via ProjectFinder

  1. … 9 more files in changeset.
Add transformation workspaces for composite builds

  1. … 9 more files in changeset.
Add dependency constraints DSL

This adds the DependencyConstraint and DependencyConstraintHandler types

with their implementations and wires them into the DependencyHandler.

  1. … 15 more files in changeset.
Introduce new interface DirectDependency

To distinguish between direct dependencies and dependency constrains,

which will also be modelled as (optional) dependencies.

  1. … 7 more files in changeset.
Revert "Reverted changes from PR#1900"

This reverts commit 3769869c339a2d4b753f92617641055adb3e4b16.

  1. … 13 more files in changeset.
Moved a bunch of classes from `core` to `dependencyManagement`

  1. … 41 more files in changeset.
Added a public API reachable from `DependencyHandler` that allows a plugin to define attributes that should be attached to artifacts with a given extension, for example when consuming a Maven module or files defined by a file dependency.

The intention is that this meta-data about artifact types would complement (and maybe serve as input for) additional meta-data attached to a Maven/Ivy/local module by various meta-data rules.

  1. … 23 more files in changeset.
Inlined an action class that is no longer required.

Reverted changes from PR#1900

  1. … 25 more files in changeset.
Gradle will now cache `apply from: 'http://bla'`

This will allow Gradle to use resources that are only avaliable when

offline. This also makes it so that when you apply from the same url in

a lot of projects, the request will only be made once.

    • -0
    • +25
  1. … 13 more files in changeset.
Throw `UnknownDomainObjectException` instead of NPE for unknown configuration

When adding a dependency to an unknown configuration, Gradle should

throw an informative `UnknownDomainObjectException` instead of just

failing with a `NullPointerException`.

  1. … 1 more file in changeset.
Replace Get/SetPropertyResult with an Optional-like type

This greatly reduces the number of allocations in our meta-object


  1. … 27 more files in changeset.
Simplify the definition of the standard 'artifactType' attribute.

  1. … 1 more file in changeset.
Tidy up `VariantTransformRegistrations`

- Merge `VariantTransforms` and `VariantTransformRegistrations` into `VariantTransformRegistry`

- Introduce interface type for registration

  1. … 12 more files in changeset.
Renamed `ArtifactTransform` -> `VariantTransform` where appropriate


  1. … 16 more files in changeset.
Split registration from configuration for ArtifactTransform

This change splits the function that performs an artifact transform from

the configuration of what variants are transformed to what other variants.

The `from` and `to` attributes are registered directly when registering

a transform, which can be re-used for different attribute mappings.


    • -49
    • +0
  1. … 17 more files in changeset.
Removed some now unused fields.

  1. … 2 more files in changeset.
Revert "Remove registerTransform from public API"

This reverts commit c8c7ab3f44f8724c40d3ebab1c46b3b8d6a3d490.

  1. … 1 more file in changeset.
Remove registerTransform from public API

The transform API is not yet finalized.

  1. … 1 more file in changeset.
Introduced an interface that a decorated type can implement to make available in the DSL dynamic methods beyond those declared statically on the type, as a more efficient replacement for `methodMissing()`.

Use this in `DefaultDependencyHandler` to avoid flow control using an exception with this kind of construct:


dependencies {

compile project(':other') // throws exception locating `project()` method



  1. … 7 more files in changeset.
Rework caching of `ImmutableAttributes`

This commit completly reworks the storage of attributes and immutable attributes. At the root of

the change is the `ImmutableAttributesFactory`, which is used to create, combine and cache

immutable attribute sets. This factory lives at the build scope level, and does *not* use a `Map`

to represent attributes. Instead, it creates a "tree" of attributes, which are mutated by adding

a new attribute. This dramatically reduces the memory pressure caused by the creation of immutable

attributes, as long at the set of attributes and values is small (which should be the case).

It's worth noting that the factory is not a _perfect_ cache. For example, depending on the order

of attributes, several "sets", corresponding to several "path to root" can be created. For example,

we can see `(foo, bar, baz)` and `(baz, foo, bar)`. Even if they are equivalent, there will be

2 distinct paths in the cache. This is not a problem, since equality check works, and the overhead

of de-duplicating is significant, so doesn't bring any advantage.

The commit also introduces a `lockAttributes` method on `ConfigurationInternal`, which allows

effectively locking the attribute set of a configuration, transforming it to an immutable

attribute set. This avoids, if multiple consumers ask for the configuration attributes in an

immutable form, to do the conversion several times (thus reducing the pressure again).

Last but not least, `DefaultAttributesContainer` is the mutable version of the attribute

container, and relies internally on `ImmutableAttributes`. This allows us to keep the semantics

of mutable attributes during the configuration phase (and, in particular, changes the attributes

of a configuration after the artifacts are created should be visible to the artifact attributes),

while deduplicating attributes and keeping memory usage low at the same time.

The drawback of this approach is the general complexity of the code, and having to pass the

`ImmutableAttributesFactory` along.

    • -2
    • +8
  1. … 39 more files in changeset.
Add cache for match/transform, move registration to dependency handler


    • -0
    • +43
  1. … 35 more files in changeset.
Move `configurationAttributesSchema` down to `DependencyHandler`

This commit fixes gradle/performance#251 by moving the attributes schema to the dependency handler. It's worth noting that

is also renames the configuration method from `configurationAttributesSchema` to simply `attributesSchema`.

  1. … 18 more files in changeset.
Use a specific artifact identifier for files added for `gradleApi()`, `gradleTestKit()` and `localGroovy()` dependencies, to give some clue as to where these files came from.

  1. … 14 more files in changeset.
Remove `setDependentConfiguration`

This commit removes the `setDependentConfiguration` in favor of passing context, because a `Dependency` can be used

in various configurations, so there's no unique dependent configuration.

It's work in progress and it breaks the test suite, especially for the "non fluid" dependencies case.

  1. … 23 more files in changeset.
First draft for introducing configuration attributes

This commit introduces "attributes" on `Configuration`, that are used during dependency resolution

to find an appropriate matching configuration. When a dependent configuration declares attributes,

then instead of looking for the dependency configuration directly in the dependency project, we

are instead trying to locate a configuration which matches the appropriate attributes.

  1. … 6 more files in changeset.
Don't create unnecessary delegate

  1. … 1 more file in changeset.
Remove `DependencyHandler#project`

This commit removes the recently added `project` method aimed at improving dependency configuration time.

The "real" solution is going to come in 3.0 with improved "methodMissing" handling in the DSL.

+review REVIEW-5952

  1. … 2 more files in changeset.
Remove `DependencyHandler#project`

This commit removes the recently added `project` method aimed at improving dependency configuration time.

The "real" solution is going to come in 3.0 with improved "methodMissing" handling in the DSL.

+review REVIEW-5952

  1. … 2 more files in changeset.