DistributionFactoryTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Force AbstractTestDirectoryProvider to use Class (#12431)

Closes https://github.com/gradle/gradle-private/issues/2988

This PR adds `className` to `AbstractTestDirectoryProvider` so there'll be no more `unknown-test-class`.

  1. … 407 more files in changeset.
Fix tests

  1. … 372 more files in changeset.
Fix tooling-api unit test for distribution install

    • -12
    • +13
    ./DistributionFactoryTest.groovy
  1. … 2 more files in changeset.
Fix tooling-api unit test for distribution install

    • -12
    • +13
    ./DistributionFactoryTest.groovy
  1. … 3 more files in changeset.
Refactor logging for wrapper download

  1. … 3 more files in changeset.
Remove unused imports

Remove `ScriptingLanguage` SPI

`ScriptingLanguage` becomes a simple data class with hard-coded values in Gradle core.

Pros:

* much simpler code

* more correct behaviour: Kotlin scripts are found even when the JVM runtime wouldn't allow the provider to be loaded

* better runtime behaviour (possibly incompatible classes are not loaded until a Kotlin script is actually needed)

Cons:

* hard-coded class name in Gradle core

* no longer extensible

* file extension is under Gradle core control, not `kotlin-dsl`

  1. … 16 more files in changeset.
Pull ScriptFileResolver up in favor of BuildLayoutFactory

  1. … 9 more files in changeset.
Strive to keep Gradle's monotonic clock in sync with the system clock

  1. … 71 more files in changeset.
Simplify time handling internally and for build scans (#2857)

* Don't make TimeProvider Serializable.

This isn't safe and generally doesn't make sense.

* Extract and promote the concept of a build timer.

This was previously not well defined and being overlaid with the concept of when a user/tool requested something, which is not always the same thing.

* Pare down the deprecated org.gradle.util.Clock down to the minimum required.

Internal usage is replaced by a `getStartTime()` directly on BuildRequestContext.

What is left is only kept for backwards compatibility with scans.

* Rename TimeProvider to Clock.

* Move BuildExecutionTimer out of baseServices into core, and into a better package.

* Remove unused.

* Simplify the time package by merging types.

* Prevent the client's build started timestamp from being later than when the provider received the build request.

* Provide a dedicated mechanism for conveying the build start time to build scans.

* Consolidate the ways of formatting durations.

  1. … 179 more files in changeset.
Use a common `ReliableTimeProvider` for test execution

- For external process, WorkerServices registry has a reliable TimeProvider

- For client side, use TimeProvider build process

  1. … 5 more files in changeset.
Use a common `ReliableTimeProvider` for tooling API `ConnectorServices`

  1. … 5 more files in changeset.
Settings script detection takes scripting language providers into account

  1. … 18 more files in changeset.
Renamed class.

  1. … 3 more files in changeset.
Ensure the correct TAPI progress events are generated when distribution download is cancelled. Moved responsibility for coordinating download and cancellation so that it happens inside the generation of start and finish events, rather than around it.

  1. … 5 more files in changeset.
Generate start and finish events for Gradle distribution download done by the TAPI.

Also moved responsibility for creating the downloader down closer to where the download happens, and inject only the listeners that are interested in the events.

    • -20
    • +23
    ./DistributionFactoryTest.groovy
  1. … 16 more files in changeset.
tooling: report gradle wrapper download progress

    • -11
    • +15
    ./DistributionFactoryTest.groovy
  1. … 68 more files in changeset.
Removed `@LeaksFileHandles` from ':tooling-api'

  1. … 11 more files in changeset.
Moved progress logging and styled text logging interfaces to live in their own packages.

  1. … 155 more files in changeset.
Moved internal logging classes from 'core' to 'logging' project.

  1. … 418 more files in changeset.
Add back more @LeaksFileHandles.

  1. … 7 more files in changeset.
Remove tooling provider classpath patching.

We're only going to support BuildActions from containers like Eclipse

using Tooling API providers 2.3+.

  1. … 7 more files in changeset.
Split test for classpath updater.

  1. … 1 more file in changeset.
Manage classpath patch as service.

This helps to reduce number of created temp files to one per ConnectionService.

  1. … 5 more files in changeset.
Ship tooling API provider patch as JAR.

  1. … 2 more files in changeset.
Extract patch required for tooling API provider.

Create tooling classloader with overriden ClasspathInferer.

  1. … 2 more files in changeset.
Changed ToolingImplementationLoader and Distribution to use the internal BuildCancellationToken type instead of the public type.

  1. … 13 more files in changeset.
Support for distribution download cancelling in toolingApi.

    • -11
    • +27
    ./DistributionFactoryTest.groovy
  1. … 8 more files in changeset.
Fixes for tests that were marked as offline and happened to be broken.

  1. … 3 more files in changeset.
GRADLE-2414 Different way how to pass userHomeDir to Distribution.

Keep DistributionFactory immutable and get userHomeDir used to install

Gradle distribution from connection parameters when creating tooling

classpath.

    • -32
    • +16
    ./DistributionFactoryTest.groovy
  1. … 15 more files in changeset.