DefaultBaseRepositoryFactoryTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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
    • +2
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 102 more files in changeset.
Merge branch 'master' into feature/JLL/depricate_http_download_dependencies

* master: (77 commits)

Realized component variants need to provide all attributes

Fix TeamCity Hygiene failures

New performance process (#10361)

Publish 5.6.1-20190825230025+0000

Publish 5.6.1-20190824230038+0000

Update .com userguide links

Update .com footer links

Update .com header links

Publish 5.6.1-20190823234015+0000

Rebase to latest 6.0 nightly

Revert "Recognize contributor"

Remove use of Java 11 API from instant execution

Recognize contributor

enhanced test source folder detection for eclipse task. (#10320)

Publish 5.6.1-20190823130927+0000

Rebase performance tests with 5.7-20190812122716+0000 baseline

Upgrade wrapper to 6.0 nightly

Rebase performance tests with 5.7-20190722220035+0000 baseline

Rebaseline to lock performance improvements

Temporarily use 5.6 as the baseline for Santa Tracker `assembleDebug` case.

...

    • -1
    • +3
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 17 more files in changeset.
Refactor HTTP deprecation logic to use HttpRedirectVerifier

    • -2
    • +6
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 60 more files in changeset.
Replace usages of `FileResolver.resolveFile()` with `FileCollectionFactory.resolving()` or `FileOperations.immutable()`, so that `FileResolver` can be responsible only for converting scalar values to File-ish values.

    • -1
    • +3
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 41 more files in changeset.
Remove special repository default behavior with GRADLE_METADATA flag

The default behavior is now that we look for 'traditional' metadata

first, but find Gradle metadata if a marker is present.

We won't look for anything else if the 'traditional' metadata is not

found. This increases performance for the cases where one repository

is asked for many modules it does not contain.

Users can opt into different behavior using `gradleMetadata()` or

`artifact()` when defining their repositories.

    • -1
    • +1
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 9 more files in changeset.
Replace another usage of the `NamedObjectInstantiator` singleton with an injected service.

    • -6
    • +4
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 32 more files in changeset.
Rename writer/parser classes for consistency

    • -2
    • +2
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 21 more files in changeset.
Decorate all domain collection container for emitting build ops (#7876)

* Update all domain object container with decorator for tracing executed callback actions

* Add decorator to a ll required occurances of DefaultDomainObjectSet

* Keep ctor for DefaultPolymorphicDomainObjectContainer as its used in gradle-idea-ext plugin

* Bring back DefaultDomainObjectSet constructor used by the android plugin

* keep backwards compatibility

    • -1
    • +3
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 122 more files in changeset.
Split off value snapshotting and attributes related methods of TestUtil

    • -3
    • +5
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 64 more files in changeset.
Support Named attributes in component metadata rule caching

The Named limitation is ok as it was imposed by making

ComponentMetadataRule isolatable already.

This requires the ability to inject the ObjectFactory in rules

    • -3
    • +2
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 22 more files in changeset.
Create and wire in a ComponentMetadataRuleExecutor

This enables ComponentMetadataRule execution to be cached

Update the CrossBuildCachingRuleExecutor to work with a set of rule

instead of a single one. This means we cache or miss on a chain of rules

instead of single rules.

Fixes #5526

    • -1
    • +3
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 32 more files in changeset.
Enforce isolation of ComponentMetadataRule

This means that passed in parameters must be snapshotable as defined by

the ValueSnapshotter

Added support for Attribute to ValueSnapshotter

    • -1
    • +1
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 53 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 <jendrik@gradle.com>

    • -2
    • +2
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 45 more files in changeset.
Adjust tests to use the new experimental feature option

Signed-off-by: Jendrik Johannes <jendrik@gradle.com>

    • -2
    • +1
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 23 more files in changeset.
Provide additional services to constructor calls in tests

Signed-off-by: Jendrik Johannes <jendrik@gradle.com>

    • -1
    • +1
    ./DefaultBaseRepositoryFactoryTest.groovy
  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.

    • -2
    • +2
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 49 more files in changeset.
Create all mutable Ivy module resolve metadata through factory

This will simplify the injection of services through the factory, when we will need the immutable

attributes factory to be pushed to resolve metadata.

    • -1
    • +3
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 26 more files in changeset.
Instantiate mutable Maven metadata through dependency injecting instantiator

This commit prepares the ability to inject services into mutable Maven metadata. This will be

required to inject the immutable attributes factory, as well as the object instantiator and

possibly other services to the immutable Maven resolve metadata. This commit reduces the

number of constructors of `DefaultMavenModuleResolveMetadata`, to make it easier to maintain.

Some tests still create mutable module resolve metadata directly. Ideally, they should also

use the factory.

    • -1
    • +3
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 19 more files in changeset.
Use ExperimentalFeatures flag to enable consumption of module metadata

TODO: convert the remaining uses of `ComponentAwareRepository`

    • -1
    • +2
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 8 more files in changeset.
Inject a module metadata parser into the `MavenResolver` rather than have it construct the parser every time it requires one, to decouple the resolve from the parser implementation and the things it might need.

    • -1
    • +3
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 9 more files in changeset.
Added `FileResourceRepository` as a global service for creating various file backed `ExternalResource` implementations. Use this in various places instead of creating these implementations directly.

    • -2
    • +2
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 41 more files in changeset.
Replaced `ExternalResourceRepository.getResourceMetaData()` with `ExternalResource.getMetaData()`.

Also changed the file backed implementation of `ExternalResource` to use `FileSystem.stat()` to calculate the file meta-data, rather than using the `File` API.

    • -1
    • +2
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 50 more files in changeset.
Add new repository

    • -0
    • +13
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 5 more files in changeset.
Use the same instantiation infrastructure for component metadata suppliers and artifact transforms. This change means that artifact transforms constructors now need to be annotated with `@Inject`.

    • -5
    • +3
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 12 more files in changeset.
Replaced all direct usages of `DependencyInjectingInstantiator` with a global `InstantiatorFactory` service.

    • -1
    • +4
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 15 more files in changeset.
Implement --offline support for resources

- Split `ExternalResourceCachePolicy` from `CachePolicy`

- Provide `ExternalResourceCachePolicy` to `CacheAwareExternalResourceAccessor`

- Allow `StartParameterResolutionOverride` to override the `ExternalResourceCachePolicy`

when build is executed with --offline

    • -1
    • +1
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 14 more files in changeset.
Add more test cases for metadata suppliers

- check what happens when used with `--offline`

- check what happens when a release or integration version is published

- checks recovery from failure

- fix offline mode support

    • -1
    • +1
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 6 more files in changeset.
Add remote resource caching

This commit introduces a remote resource cache that can be used in custom metadata rules. This cache

is bound to the repository, meaning that the user can only fetch resources _relative_ to the root

artifact URI.

    • -1
    • +3
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 31 more files in changeset.
Detangle ivy module descriptor parser

This commit removes the Ivy module descriptor parser as a service, because it unfortunately introduced

a lot of tangling between projects, making it necessary to introduce `project(':ivy')` as a dependency

to almost all projects.

This commit removes the parser as a service and creates it on demand. It should not have a big impact

on performance since there should be only one instance in global scope, through `IvyResolver`.

    • -3
    • +1
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 19 more files in changeset.
Use the module identifier factory in maven parsing too

    • -1
    • +4
    ./DefaultBaseRepositoryFactoryTest.groovy
  1. … 28 more files in changeset.