DependencyClassPathNotationConverterTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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.

    • -6
    • +2
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 41 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.

    • -6
    • +2
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 41 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.

    • -6
    • +2
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 41 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.

    • -6
    • +2
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 41 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
    • +1
    ./DependencyClassPathNotationConverterTest.groovy
  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.

    • -3
    • +5
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 60 more files in changeset.
Refine gradleApi() filtering for optional Kotlin DSL

by relying on classpath registry instead of hardcoded filtering

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +2
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 3 more files in changeset.
Use umodifiable list in DefaultClassPath

This makes accidental mutation impossible and reduces some

of the repeated wrapping.

    • -4
    • +4
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 37 more files in changeset.
defer creation of generated jar to execution time; simplify

    • -3
    • +3
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 2 more files in changeset.
Initial work on creating api jar lazy later in the build lifecycle

- moves the creation of api jar and testkit jar out of configuration time to task graph calculation

- ideally we're able to move it further down

    • -4
    • +4
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 4 more files in changeset.
Move org.gradle.api.internal.cache to persistent-cache project

+review REVIEW-6562

    • -1
    • +1
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 85 more files in changeset.
Group logs by project and task

Introduces a BuildOperationType enum and adds it to the

default BuildOperationDescriptor. Passes this information

to the logging infrastructure through the BuildOperationExecutor.

All BuildOperations now have a ProgressLogger. This allows

progress logging to maintain a heirarchy of build operations,

otherwise we would not be able to group many log events.

ProgressStartEvents are given additional information in a

compact form to allow a tree of build operations to be

maintained and their operation types associated. This allows us

to associate log events who aren't fired by progress logging to

still be grouped.

A LogGroupingOutputEventListener uses these build operation

types and the build operation heirarchy to buffer and output

logs related to tasks and project configurations.

Issue: #1818

    • -2
    • +2
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 30 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.

    • -45
    • +56
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 14 more files in changeset.
Introduce `GeneratedGradleJarCache` core service

By renaming `RuntimeShadedJarCache` and moving it from

`dependency-management` to `core`.

This removes the need for `gradle-script-kotlin` to depend on

`dependency-management` which would have caused the `core`

module to transitively depend on `dependency-management`.

The service was also upgraded from Build scope to BuildSession scope

since it only depends on BuildSession scope services itself.

See gradle/gradle-script-kotlin#52

    • -2
    • +2
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 9 more files in changeset.
Extract `RuntimeShadedJarCache` service

For the benefit of gradle-script-kotlin API jar generation.

See gradle/gradle-script-kotlin#52

    • -21
    • +11
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 6 more files in changeset.
Various tidy up to runtime shading for gradleApi() etc.

- Use the term “runtime shading” instead of “impldeps“ to identify this concept (while it's less descriptive, it's less weird)

- Reduce visibility where possible of classes involved in generating shaded JARs

- Move the relocated classes in `org.gradle.internal.impldep`

+review REVIEW-5867

    • -5
    • +5
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 22 more files in changeset.
Moved progress logging and styled text logging interfaces to live in their own packages.

    • -1
    • +1
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 155 more files in changeset.
Switch to use of fat Gradle API

+review REVIEW-5867

    • -0
    • +1
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 13 more files in changeset.
Moved internal logging classes from 'core' to 'logging' project.

    • -1
    • +1
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 418 more files in changeset.
Revert to old behavior of gradleApi() and gradleTestKit()

The new behavior is still reachable through internal APIs but not exposed to the end user.

+review REVIEW-5867

    • -1
    • +0
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 11 more files in changeset.
Cache optimizations

- Only lock on writing to the cache. Within the locking code we still have to check if file already exists as two processes could enter at the same time intially.

- Turn valid JAR names into enum.

+review REVIEW-5867

    • -1
    • +1
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 2 more files in changeset.
Switch to exclusive use of fat/relocated Gradle API/TestKit

Java Gradle dev plugin requires the use of the fully-resolve Gradle dependencies.

+review REVIEW-5867

    • -0
    • +1
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 7 more files in changeset.
Revert usage of fat/relocated Gradle API/TestKit

Requires additional fixing of existing test cases that are now impacted.

+review REVIEW-5867

    • -1
    • +0
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 6 more files in changeset.
Switch over to plain gradleApi() and gradleTestKit() dependencies

+review REVIEW-5867

    • -0
    • +1
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 6 more files in changeset.
Acquire exclusive lock when accessing cache

+review REVIEW-5867

    • -5
    • +18
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 3 more files in changeset.
Roll back for now

+review REVIEW-5867

    • -21
    • +6
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 3 more files in changeset.
Optimize cache behavior

- Cache needs to use Exclusive mode to be fully multi-process safe with multiple writers.

- Lock for write operation, no lock for read operation.

- Tweak integration tests to ensure that the JAR file is actually creates on every run of the build for that test case.

+review REVIEW-5867

    • -5
    • +18
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 3 more files in changeset.
JAR files need to indicate Gradle version

IDEs will render these JAR files as dependencies which should indicate a version.

+review REVIEW-5867

    • -1
    • +2
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 3 more files in changeset.
Progress logging is emitted during JAR generation

+review REVIEW-5867

    • -1
    • +3
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 5 more files in changeset.
Use a multi-process safe implementation for cache access

+review REVIEW-5867

    • -1
    • +5
    ./DependencyClassPathNotationConverterTest.groovy
  1. … 9 more files in changeset.