Clone Tools
  • last updated a few seconds ago
Constraints: committers
Constraints: files
Constraints: dates
Fix isolation of processed metadata

Introduce a hash of the component metadata rules, so that we can

cache different processed metadata based on the hash. This is a

performance optimization, which allows setting different processed

metadata on the "cached metadata" instance, based on a rules hash.

The rule hash is more stable when using class-based rules. If not,

then we have instance based rules which are opaque to Gradle, meaning

that we're going to create as many instances of processed metadata

as there are rules instantiated.

  1. … 18 more files in changeset.
Split off value snapshotting and attributes related methods of TestUtil

  1. … 64 more files in changeset.
Avoid the creation of a string to build the path in the file store

This creates a significant amount of garbage. Assuming we read from the store

more often than we write to, this commit builds an array corresponding to the

path in the store, rather than a string.

  1. … 3 more files in changeset.
Improve test readability

  1. … 2 more files in changeset.
Normalize `ModuleIdentifier`

This commit reworks the `ComponentModuleIdentifier`/`ComponentModuleSelector`/`ModuleVersionSelector`

classes to use `ModuleIdentifier` under the hood, instead of storing denormalized strings. This has

the advantage that we can reduce the use of the module identifier factory, which is called very

often during dependency resolution. Sharing instances reduces the need for conversions, and makes

comparisons faster.

  1. … 164 more files in changeset.
Don't clean up metadata descriptors

Metadata descriptors are small (about 4 KB) and thus don't need to be

cleaned up.

    • -21
    • +21
  1. … 4 more files in changeset.
Track artifact cache file access in PersistentIndexedCache

This commit introduces the `FileAccessJournal` interface and provides

two implementations:


Reads and sets `File.lastModified()`.


Uses a PersistentIndexedCache to store the access timestamp.

The latter is now used in DefaultCacheLockingManager for the artifact

cache. All other PersistentCaches still use the former.

  1. … 30 more files in changeset.
Mark cached files accessed when resolved via index

Both CachingModuleComponentRepository and

DefaultCacheAwareExternalResourceAccessor use an index to resolve

cached artifacts. Both now notify the underlying FileStore which now

implements FileAccessTracker. The new AccessTrackingFileStore interface

combines both interfaces so the GroupedAndNamedUniqueFileStore

subclasses (ArtifactIdentifierFileStore and ExternalResourceFileStore)

can be injected into dependent components.

    • -22
    • +22
  1. … 32 more files in changeset.
Intern strings when reading module metadata from cache

Dependency resolution of large dependency graphs involves a significant

number of comparisons of strings(group, artifact, version, ...). Most of

those come from the module metadata cache, and even if we use hashmaps,

we still need to perform `equals` comparisons on strings, when in most

of the cases they should be identical. This commit takes advantage of

knowing that to add a cost when we read module metadata (interning), but

realizing that the debt is paid when comparing strings during resolution.

The interner is build scoped (in order to avoid memory leaks), thread-safe,

and shared with the dependency notation converter, so that module selectors

created from strings found in the build scripts are using the same strings

as the ones from the module metadata cache.

Ideally, we should also do this for the strings used during parsing.

  1. … 17 more files in changeset.
Rename 'experimental features' to 'feature previews'

The idea behind this is that we have a set of feature previews rather

than one cryptic experimental flag.

A feature preview collects a set of related functionality (e.g.

everything related to gradle metadata) that changes existing behavior

and thus could potentially break existing builds. The preview options

will be removed with the next major release (currently 5.0) and the new

behaviour will then become the default.

Signed-off-by: Jendrik Johannes <>

  1. … 45 more files in changeset.
Provide additional services to constructor calls in tests

Signed-off-by: Jendrik Johannes <>

  1. … 14 more files in changeset.
Initial implementation of component metadata rules allowing modification of variant attributes

This commit introduces metadata rules that support modification of variant attributes. Variant attributes

are specific to each variant and can be found in module metadata. Those are NOT component level attributes,

which could be used during dependency resolution. This will be added in a subsequent commit.

  1. … 49 more files in changeset.
Removed the legacy `ModuleDescriptorState` type from the various metadata types. All data is now contained in properties on the relevant metadata types, rather than spread or duplicated across the metadata and the descriptor types.

  1. … 23 more files in changeset.
Moved the module level exclude rule definitions and branch property for Ivy metadata from the legacy `ModuleDescriptorState` onto the relevant metadata types. The Maven metadata has no module level excludes or branch property, so don't persist these for Maven modules.

Incremented the cache layout version to reflect the changes to the persisted metadata.

  1. … 26 more files in changeset.
Some simplifications to the Ivy and Maven metadata parsing. Don't extract and persist the `description` and `publicationDate` properties for Ivy and Maven as these values are not required for dependency resolution. Incremented the cache version to reflect this change.

Removed some dead code that attempted to include a `description` in a generated ivy.xml, as there is no way to specify this in the Gradle DSL.

Moved some Maven metadata properties from constructor parameters to mutable properties.

  1. … 17 more files in changeset.
Cache module version identifiers

In a similar way to module identifiers, use the module identifier factory to cache the module version identifiers.

It allows faster comparisons as we will hit `a==b` much more often and don't have to go the `equals` route. There

are still places where the factory is not used, but it doesn't seem to have a huge impact on performance.

  1. … 49 more files in changeset.
Turn `ModuleExclusions` into a build scoped service

  1. … 53 more files in changeset.
Pass module identifier factory down to the module metadata serializer

  1. … 4 more files in changeset.
Use the same type for the key of both the indexed cache and file store pieces of the module metadata cache.

  1. … 2 more files in changeset.
Moved `ModuleDescriptorState.dependencies` up to the `Metadata` types.

  1. … 21 more files in changeset.
Continue to separate the mutable and immutable module meta-data views implementations. In this change, the immutable view implementations no longer also implement the mutable view interfaces.

  1. … 15 more files in changeset.
Started to separate the implementations of module meta-data into an immutable and a mutable implementation.

  1. … 25 more files in changeset.
Some renames.

    • -0
    • +72
  1. … 13 more files in changeset.