Gradle

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Use JaCoCo 0.8.1 by default (#4807)

    • -1
    • +1
    /subprojects/docs/src/docs/dsl/org.gradle.testing.jacoco.plugins.JacocoPluginExtension.xml
    • -0
    • +4
    /subprojects/docs/src/docs/release/notes.md
Fix 4457. Don't set parallel mode and threadCount for testng if not explicitly defined (#4794)

Previously, Gradle default `threadCount` and `parallel` configuration

will overwrite those defined in xml. This PR fixes this by detecting if

the configuration is default value.

Ensure command-line deprecation messages are sent from the client to the daemon, as was previously happening when Java serialization was used. Change signatures on various types to communicate this expectation better.

It would be better if the messages were logged in the client rather than travelling to the daemon and then back again. This change does not address this and simply recreates the situation that was already in place.

  1. … 5 more files in changeset.
Exclude anonymous class in JUnit Platform (#4774) (#4815)

This fixes https://github.com/gradle/gradle/issues/4544 https://github.com/gradle/gradle/issues/4618

Previously we send anonymous class to JUnit Platform test worker, which caused some issues.

Now they're excluded by name pattern .*\$\d+

Fix typo in files chapter (#4801)

Make ClassMethodNameStackTraceSpec support anonymous class matching (#4797)

Make ClassMethodNameStackTraceSpec support anonymous class matching

This fixes https://github.com/gradle/gradle/issues/4681

Previously, when TestExceptionFormatter formats test stacktraces, it tries to

find the exactly matched class/method name as stacktrace truncation point.

However, some kotlin-based tests have only anonymous classes in their stacktraces,

which makes it impossible to find the exact truncation point. This PR treats

`SomeClass$1$1$1` and `SomeClass` equally when performing class name matching.

Bump wrapper

This fixes an NPE that appeared with the addition of capabilities in the previous

commits.

    • -1
    • +1
    /gradle/wrapper/gradle-wrapper.properties
Replace code based configuration with JSON

This commit replaces the capability internal DSL with an external configuration

based on JSON. This is a spike for what _could_ become published rules, if we

ever want to do that. The advantage is that the code of the plugin that fixes

metadata is independent from the data of the patch itself: the JSON file only

contains the capabilities we want to declare, and what to do with them.

Allow creation of Task with constructor arguments (#4809)

* Allow creation of Task with constructor arguments

Rough spike on exposing constructor arguments in Task creation DSL

Fixed codestyle failure

Fixed binary compatibility failure

Fixed docs checkstyle on Task.TASK_PARAMS

Fixed infinite recursion

Fixed "broken" tests

Rename TASK_PARAMS to TASK_CONSTRUCTOR_ARGS

Add TaskContainer.create(String, Class<>, Object...)

Add better description to TaskContainer.create(String, Class, Object...)

Add @since & @Incubating to TaskContainer.create(String, Class, Object...)

Ignore some tests of DependencyInjectingInstantiator whose output *should* change

Fix tests in DefaultTaskContainerTest

Avoid explicit cast of DirectInstantiator.INSTANCE to DirectInstantiator

Back out addition of NamedEntityInstantiator.create(String, Class, Object...)

Fix omitting constructorArgs from previous cleanup

Revert DefaultTaskCollection.create(String, Class) to use instantiator

Revert optimize import

Fail if constructorArgs is not a List<> or Object[]

Remove handling of non-@Inject constructor with constructor args

Revert DependencyInjectingInstantiatorTest

Move TaskInternal logic from DefaultTaskContainer to TaskFactory

Make ITaskFactory extend NamedEntityInstantiator again

* Fix AnnotationProcessingTaskFactory.create(String, Class) double-processing

* Update DefaultTaskContainerTest to use ITaskFactory.createTask() for some mocks

* Reduce size of ITaskFactory interface

* Add DefaultTaskContainer.createTask() to avoid adding task multiple times

* Fix test failures related to removing ITaskFactory.createTask(Map)

* Optimize imports

* Optimize imports

* Fix test failures related to removing ITaskFactory.createTask(Map)

* Add tests for Task constructor arguments in Groovy build script

* Add tests for Task constructor arguments in Java plugin via API

* Add tests for Task constructor arguments in Kotlin build script

* Add tests that check for constructorArgs being List or Object[]

repair and improve test for Windows line endings, now checks that no Linux line endings present.

Signed-off-by: Jason Archer <jasonmarcher@gmail.com>

By default don't render the welcome message to avoid test flakiness (#4796)

Fix NPE in capabilities conflict resolution

It is possible that a large dependency graph resolves capabilities conflicts 2 by 2, at

different "depth" in the transitive graph. In this case, it is possible for a module to

be selected, but then it needs to be considered again when a new module providing the

same capability appears in the graph. If not, we wouldn't choose any version, producing

an NPE when we read the graph back from the binary store.

The error was discovered during dogfooding, so this commit is a pre-requisite to using

capabilities in the Gradle build (will require a wrapper update).

This commit also improves the selection reason in case of capability conflict resolution,

to make it clear it was upgraded to the latest version.

Use capabilities to declare incompatiblities between modules

This commit changes the dependency metadata rules to use capababilities when it makes

sense. Capabilities can be used to declare that two modules are providing the same

functionality, so it's illegal to have them both on classpath. In this case, we choose

one module over the other. However, in some cases, we want to always use the newer

capability provider, even when there's no conflict, so there are two possibilities:

- `select()` will "soft choose", just in case of conflict

- `forceUpgrade()` will always replace a dependency with the preferred provider

In general, `select()` should be enough, but there are limitations. For example, we

can explain that `org.ow2.asm:asm:6.1` provides `asm:asm:6.1`, and that `org.ow2.asm:asm-tree:6.1`

provides `asm:asm-tree:6.1`. In this case, if the dependency graph contains:

- `asm:asm-tree:3.1` -> `asm:asm:3.1`

- `org.ow2.asm:asm:6.1`

Then we will automatically upgrade `asm:asm:3.1` to `6.1`, but _not_ `asm-tree`, because

there's no conflict for this module. As we cannot guarantee it's a compatible combination,

we forcefully upgrade all modules of "ASM" to the same version.

Technically, this feature relies on the "capabilities" feature of Gradle 4.7. Since no external

module declares any capability, we need to do 2 things:

1. use rules to declare the capabilities for external modules

2. fix the conflicts when they happen

We chose to automatically generate a synthetic capability for all modules that provide the same

capability, and rely on automatic upgrade to fix the conflicts. For example, if modules `A`, `B`

and preferred module `C` provide the same capability `cap`, then:

- `A` is assigned capability `cap` version `1`

- `B` is assigned capability `cap` version `2`

- `C` is assigned capability `cap` version `3`

This way, when `A` and `B` are in conflict, we will prefer `B`. When `B` and `C` are in conflict,

we will prefer `C`.

Deprecate FileCollection.asType()

The method was used to add some special conversions for `FileCollection` in Groovy. In an attempt to remove Groovy-specific functionality from public API the method is now deprecated. The type conversions, while not widely used to start with, will mostly keep working because `FileCollection` implements `Iterable<File>` which Groovy know how to convert to other collections.

    • -0
    • +12
    /subprojects/docs/src/docs/release/notes.md
Code and documentation ajustments to PR

This commit:

- Renames methods in PhasedBuildActionExecuter and corresponding uses

- Improves public java docs making them more precise

- Replaces mocks by stubs in unit tests when possible

- Makes action's handlers in phased actions not receiving failures (they

are send to build results)

Signed-off-by: Lucas Smaira <lsmaira@google.com>

  1. … 24 more files in changeset.
Revert "Exclude anonymous class in JUnit Platform (#4774)"

This reverts commit abeb7ebb9e3cb17c826ad40caac6a54480beccad.

Add @ToBeImplemented integration tests for #4799

Remove preemptive cache pipeline again

TC committed a patch file after the pipeline was deleted

TeamCity change in 'Gradle :: Build Cache Preemptive' project: project 'Build Cache Preemptive' was removed

Remove preemptive cache pipeline

Always report Checkstyle violations-summary from xml report (#3901)

Report Checkstyle violations from xml report, regardless of build pass/fail.

Prior to this, Checkstyle plugin would be silent unless the build failed or

ignoreFailures=true. If thresholds maxErrors and maxWarnings were not met,

reported rule violations in the XML or HTML reports were not mentioned in

build output.

With this change, if Checkstyle is configured to produce an XML report (default),

the report is parsed and violations summarised in the Checkstyle task build output.

This occurs regardless of whether the build failed or not.

Fixed #881

Increase iteration counts for performance tests

Merge pull request #4791 from gradle/lacasseio/native/no-verbose-flag-by-default

Remove the verbose flag by default for `swiftc`

Merge pull request #4691 from gradle/sg/native/swift-os

Wire operatingSystem into Swift binary types

Fix failing unit tests

Merge pull request #4792 from gradle/bm/flaky-test/welcome-message

Create marker file to prevent rendering of initial welcome message in integration test

Upgrade org.gradle.kotlin.ktlint-convention to 0.1.4

No more deprecated Gradle features usage

No more crash when spaces in path

Bump plugins-experiments version and dogfood

Bump ktlint version to 0.20.0 and ktlint-gradle to 3.2.0

No more deprecated Gradle features usage

No more crash when path contains spaces

Create directory