Clone Tools
  • last updated a few seconds ago
Constraints: committers
Constraints: files
Constraints: dates
Add missing @Override to all modules

Signed-off-by: Paul Merlin <>

  1. … 991 more files in changeset.
Deprecate download of resources over HTTP; Require opt-in

Signed-off-by: Jonathan Leitschuh <>

  1. … 49 more files in changeset.
Make script source hashing faster

Do not calcualte the hash for the same script multiple times.

The hash is now stored in the text resource itself so we don't need

an externall managed cache. The UriTextResource implementation has

been thoroughly optimized for local file URIs. Previously reading

those in was a major bottleneck due to copying every byte into 4(!)

different buffers.

Adding the HashCode to the TextResource made me aware of the fact

that the tooling API depended on these interfaces, although it should

never be reading scripts. It turns out that the script was attached to

the BuildLayout, where it didn't really belong. It is now only created

once the build is running and we are actually trying to load the settings

file. There were a few changes to types marked with @UsedByScanPlugin.

These were all checked against the scan plugin code base to ensure they

are safe. The reported data is now more accurate as it returns a `null`

value for a non-existing settings file instead of reporting a dummy path.

    • -22
    • +72
  1. … 19 more files in changeset.
Correct Javadoc of SingleDepthFileAccessTracker

De-incubate 3.x package-info files

And files we missed due to moving things to coreApi.

  1. … 32 more files in changeset.
De-incubate 2.x authentication API

  1. … 4 more files in changeset.
Use Files.setLastModifiedTime to touch files

While, `File.setLastModified` always uses `utimes` on Unix,

`Files.setLastModifiedTime` uses `futimes`, if available, which seems to

be able to set the timestamp for writable files owned by another user.

Resolves #6971.

  1. … 1 more file in changeset.
Use Files.setLastModifiedTime to touch files

While, `File.setLastModified` always uses `utimes` on Unix,

`Files.setLastModifiedTime` uses `futimes`, if available, which seems to

be able to set the timestamp for writable files owned by another user.

Resolves #6971.

  1. … 1 more file 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.
Remove suppressed warnings for Java 7 features

Now that we use Java 7 source level, we no longer have to suppress

warnings for using Java 7 APIs in IDEA.

  1. … 27 more files in changeset.
Separate fingerprints and snapshots (#5927)

This de-tangles FileContentSnapshot (and removes it) from NormalizedFileSnapshots.

Also it makes clear that only PhysicalSnapshots can be used to check if a file changed the timestamp.

  1. … 87 more files in changeset.
Add convenience method to track access to single file

  1. … 7 more files in changeset.
Delete access times for deleted files from journal

When a file is deleted by the LeastRecentlyUsedCacheCleanup action, the

corresponding entry is now removed from the used FileAccessTimeJournal

in order to avoid storing obsolete entries that would never get removed.

  1. … 6 more files in changeset.
Track file access in AbstractCachedIndex

Instead of tracking access in DefaultCacheAwareExternalResourceAccessor

and CachingModuleComponentRepository this is now done in

AbstractCachedIndex which ensures it's done always when reading from

indexes of CachedItems and only does so when not already present in an

in-memory cache from a previous lookup.

  1. … 39 more files in changeset.
Remove separate interfaces for reading and writing file access time

Now that reading and writing is safe again regardless of the phase

we don't need the separate interfaces anymore.

  1. … 5 more files in changeset.
Write access time asynchronously, read synchronously

File access times are now written asynchronously while the cache is

being used. When it's about to be closed, they are now read

synchronously from the cleanup action because the cache access worker

has then already been stopped.

    • -0
    • +20
    • -0
    • +25
    • -0
    • +25
  1. … 25 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. … 27 more files in changeset.
Polish and document new top-level types

  1. … 16 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.

    • -0
    • +20
  1. … 30 more files in changeset.
Clean up least recently used entries in external resources file store

The files in the external resources file store cache are now

automatically cleaned up based on a least recently used strategy. The

structure in the cache is as follows:

- modules-2

- resources-2.1

- 0

- hash 1 (*)

- hash 2 (*)

- ...

- ...

The cache now keeps track of files accessed inside the marked hash

directories. The cleanup action then deletes all such files that have

not been accessed in the last 30 days.

  1. … 26 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.
Rationalise handling of “current” build operation and build operation ID

For an upcoming change to emit console logging as build operation progress events, we need to associate all progress logging with the build operation. This pulled a thread on some long overdue cleanup.

The end result is:

1. Base build operation infrastructure is consolidated org.gradle.internal.operations.

2. Mechanism for passing thread global current build operation is more test friendly, and better named.

3. A consistent mechanism is used for binding the current operation to the thread, instead of two mechanisms.

4. Build operation IDs are typed to OperationIdentifier.

There is no public API or user behaviour change.

  1. … 147 more files in changeset.
Only support moving into file store

    • -10
    • +0
  1. … 11 more files in changeset.
Identify host fragment as host in file:////host/path resource names (#4074)

Before, also 'host' was treated as part of the path. With the changes

in e13e45a, we do additional path normalization on resource names

when we resolve a relative path. That is, all additional '/'s are

stripped. This also converted '//host' to '/host'. Which is different:

the first is a host (i.e. a network share), and the second is just the

first segment of a path. This fix identifies a host in a path that

starts with '//' and makes this host part of the 'root' in a

ExternalResourceName rather than the path.

This fixes #4002, which is a 4.4 regression. In practice, these changes

only have an effect on Windows.

  1. … 2 more files in changeset.
Make UriTextResource#getFile cheaper

This method was checking whether the file exists,

which doesn't make sense, because it could only

happen if a file URI was passed in the constructor.

If that file doesn't exist, then trying to read

content from the URI won't work either. We were

basically checking the existence twice - once when

calling getFile and another time when hashing it or

when trying to read from the URI instead. This made

the happy case unnecessarily slow without improving

failure behavior.

We now return the file unaltered and instead catch

the FileNotFoundException during hashing to provide

a nicer error message.

  1. … 3 more files in changeset.
Fixed some formatting issues.

Some fixes to handling relative URLs specified in the module metadata file.

  1. … 1 more file in changeset.
Some changes to caching of external resources:

- Moved the file store to live under `caches/modules-2` as the file store is protected by the lock on this directory. The external resource metadata is cached under this directory as well.

- Use a hash of the _content_ of the external resource to calculate the resource's location in the file store, so that entries never need to be overwritten. Previously a hash of the _location_ of the external resource was used. Also include the base name from the URL to allow a human to get some idea of what each file contains.

- Use custom serialization rather than Java serialization for the external resource metadata cache.

- Renamed a couple of metadata caches to better reflect their purpose.

  1. … 15 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.
Move PathKeyFileStore to `:resources`

+review REVIEW-6562

  1. … 16 more files in changeset.