Gradle

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix PMD 6.0.1 deprecation warnings

Support PMD incremental analysis

    • -0
    • +7
    /subprojects/docs/src/docs/release/notes.md
Merge remote-tracking branch 'origin/release'

* origin/release:

Polish Kotlin DSL part of release notes preamble

Fix flaky tests on rich console

Refine Kotlin DSL mention in release notes preamble

Expand on low-ceremony plugins in 4.7 release notes

Merge pull request #4899 from gradle/eriwen/docs/kotlin-dsl-notes-take-2

Expand on pre-compiled script plugins in 4.7 release notes

Polish Kotlin DSL part of release notes preamble

    • -4
    • +3
    /subprojects/docs/src/docs/release/notes.md
Merge pull request #4909 from gradle/gh/stable-native/flaky-console

Fix flaky tests on rich console

Fix flaky tests on rich console

Sometimes, the status bar and work in progress sections can flush

and end up on the same line as the build failure message. When this

happens, we can fail to split the output properly, causing tests to

be flaky.

Update release notes to mention a potential breaking change.

    • -0
    • +4
    /subprojects/docs/src/docs/release/notes.md
Disable Kotlin caching smoke test as the Kotlin plugin that it uses relies on broken behaviour of `TaskContainer.remove()`. Previously this didn't _actually_ remove the task but now it does. The Kotlin plugin needs to also remove all dependencies on the `compileJava` plugin for this to work.

Change Java base plugin to lazily configure the defaults for Java compile tasks. This means that the `compileJava` task for each source set is created and configured lazily again.

Add method to `DomainObjectCollection` to configure each element with a given type when the element is required. This allows build logic to lazily configure tasks that are created using `createLater()` and domain object elements that are added to a container using a provider.

  1. … 15 more files in changeset.
Add some basic synchronization around access to the mutable state of a project from the dependency resolution engine. This synchronization isn't complete and there are a number of other places where the state of a project is accessed by Gradle services from multiple threads concurrently. This change includes just enough to prevent multiple threads triggering the creation and configuration of deferred tasks when they are indirectly referenced via project dependencies from multiple threads at once.

Add some validation so that attempting to create a task with the same name as an existing task fails, when one or both are defined using `createLater()`.

Fix bridging of tasks into software model so that deferred tasks are visible to rules without eagerly creating the tasks.

Change `DomainObjectCollection` implementations so that actions added using the eager `all()` and `withType()` methods receive elements as soon as the element is defined, regardless of whether added using a provider or directly, for backwards compatibility.

This change means that the `compileJava` task is created eagerly during configuration due to the presence of these kinds of actions used in the Java and Java base plugins.

Add a method to `DomainObjectCollection` to allow elements to be configured lazily, as required. This method isn't used by the Java plugins yet.

Use lazy task APIs to define the lifecycle tasks, rather than using the internal placeholder task API (and compensating logic to make sure there are no name collisions).

Fix the `DomainObjectCollection` implementations so that add events are not fired twice for elements that are added using a provider.

Change `DefaultNamedDomainObjectCollection` to better handle elements added using a provider, in particular when locating elements by name.

Change `DefaultTaskContainer` to use this to implement `createLater()` rather than the existing placeholder actions, to make deferred task creation less of a special case.

Remove unused method.

Avoid accessing `ResolutionStrategy` for non-root components

To determine if a configuration should have dependency locking enabled,

we inspect the ResolutionStrategy for that configuration. However, we

were needlessly inspecting this for configurations in referenced

projects, leading to added contention.

With this change, we only inspect the resolution strategy for

configurations when building the component metadata for the root

component, not for any referenced project components.

Add configurations to metadata serially

This will permit the added configuration to be later modified by the

caller, so that we can apply specific logic to configurations of the

root component.

Minor cleanups to dependency graph engine

Ensure that a `DomainObjectCollection` view filtered by type contains matching elements that have been added using a `Provider`.

Change the Java plugin to use a provider to wire up the output of the Java compile task as an outgoing artifact, rather than eagerly querying for the task.

Do not copy the tasks for a `BinarySpec` into task container if that binary is bridged from the Java base plugin, as these tasks will already be present.

Change the Java base plugin so that it uses the lazy task API to create the `compileJava` task of each source set. The task is still created eagerly at configuration time as the Java plugin locates it by name to wire up its outputs as an outgoing artifact of the project.

Fix `DomainObjectSet.addLater(Provider<T>)` so that the elements are added when the set is iterated.

Change the Java base plugin so that it does not attach the `classes` task for each source set as the "build" task for the associated binary.

This is a breaking change, but this breaking change is on the software model view of the Java binaries and so is unlikely to have any impact. This breaking change can be fixed with some more effort to avoid realizing the classes task in the software model rules, if we need to.

Add an overload of `TaskContainer.createLater()` that uses a default task type and change the Java base plugin to use this for the `classes` task of each source set. The task is still created eagerly during configuration as the base plugin resolves it to wire it into the binary for the source set.

Merge pull request #4874 from gradle/dd/dependency-management/resolve-all-selectors

Consider all selectors when resolving to a component