Clone Tools
  • last updated a few seconds ago
Constraints: committers
Constraints: files
Constraints: dates
Move `reporting` sources to `src/main/java`

No Groovy sources left.

    • -119
    • +0
    • -84
    • +0
  1. … 32 more files in changeset.
Replace usage of `String#format` with good old string concatenation

The rationale behind this change is that while `String#format` is usually admitted as good for readability (this is arguable),

in practice it is very bad for performance. Since Java 6, the JVM (the JIT, to be correct) does a pretty good job at optimizing

string concatenation. However, it is only capable to do so if we're using "dirty" string concatenations (using `+`), or `StringBuilder`.

However, usage of `StringBuilder` is not recommended either for 2 reasons:

1. it significantly decreases code readability

2. in Java 9, String concatenation is even more optimized thanks to `invokedynamic`, and code using `StringBuilder` will *not* benefit

from this optimization.

There are sill leftover `String#format` calls in the code, in the following cases:

- the call is used to generate an exception message. That's 90% of the remaining calls.

- the call is obviously a debug message, often used in `toString` (because as we all know, `toString` should only be used for debugging)

- the format includes specific number formatting patterns

- I missed it

  1. … 223 more files in changeset.
Improve property and method lookup from some configuration closures, by short-circuiting the inefficient lookup in `Closure` and reusing the lookup in `ConfigureDelegate` instead.

Currently this improvement is applied only in a few places in the DSL, in particular when configuring any named container (but not its elements). A later change will roll this out more widely.

This change also removed duplicate property and method lookup on the owner object for these closures, improves error reporting on missing property or method so that the actual target of the configure closure is reported, and also cleans up the closure parameter and closure.delegate objects that are visible to the closure body so that they are always the target object.

  1. … 12 more files in changeset.
Move the CustomizableHtmlReport over to reporting.

+review REVIEW-5862

    • -0
    • +42
  1. … 9 more files in changeset.
Add missing Report related types to the documentation

- Rename CustomizableHTMLReport -> CustomizableHtmlReport to match other class names

- Split all reporting related types into a separate section to keep the core list short

  1. … 15 more files in changeset.
Initial implementation of Tooling API performance tests

This commit introduces a new kind of performance tests, aimed at measuring the performance of the Tooling API.

By extending `AbstractToolingApiCrossVersionPerformanceTest` a test can check the performance of the tooling

API for various scenarios. In that case, you can specify:

- a list of target versions

- an action to execute in a `GradleConnection` context

The list of target versions is used to tell which version of the Tooling API to use, but also to tell which

version of Gradle we're connecting to.

For now, we're only checking the total duration of the operation, and we are reusing the `CrossVersionResultsStore` to

store the results. We do *not* check the memory consumption yet (not our initial focus).

  1. … 43 more files in changeset.
Apply abstract modifier to classes consistently

Prior to this commit, a minority of clases positioned the `abstract`

modifier before the `public` visibility modifier:

{ git grep -h '^abstract public'; git grep -h '^public abstract'; } \

| cut -d' ' -f1-3 | sort | uniq -c

25 abstract public class

232 public abstract class

This commit normalizes this usage with the following command:

git grep -l '^abstract public' \

| xargs perl -p -i -e 's/^abstract public/public abstract/'

Resulting in the following homogeny:

{ git grep -h '^abstract public'; git grep -h '^public abstract'; } \

| cut -d' ' -f1-3 | sort | uniq -c

257 public abstract class

  1. … 24 more files in changeset.
Replaced `Specs.and()`, `or()` and `not()` with `intersect()`, `union()` and `negate()`.

The new methods perform some simplification of the specs, such as removing double negation or short circuiting 'and(nothing, something)''. The specs created by these methods are used to select files in file sets, and can be invoked many, many times during a build.

New methods were required as the signatures of the old methods did not allow much simplification. The old methods have been deprecated and will be removed in Gradle 3.0.

  1. … 17 more files in changeset.
Keep an internal name -> object index for named domain object collections.

Previously, a request for an object by name (which happens very often) resulted in a linear search of the backing collection, generating the name and then comparing against that target. We now maintain an index which allows fast retrieval/detection of an object by name.


  1. … 9 more files in changeset.
Remove AppliedPlugins and make PluginManager the public replacement for PluginContainer.

+review REVIEW-5298

  1. … 97 more files in changeset.
Add apply(String) and apply(Class) to PluginAware.

+review REVIEW-5298

  1. … 69 more files in changeset.
Remove PluginAwareInternal.

Snowballed into completely rewriting PluginManager and parts of DefaultPluginContainer.

+review REVIEW-5214

  1. … 55 more files in changeset.
Deprecate PluginContainer.apply(Class) and PluginContainer.apply(String)

+review REVIEW-5239

  1. … 101 more files in changeset.
Change: Correct some misspelling and duplicate words

  1. … 26 more files in changeset.
Tweaked generation of html for various reports so that border-radius works on IE versions that support it.

  1. … 6 more files in changeset.
Synced up the footers of the test report and build dashboard.

  1. … 4 more files in changeset.
Changed BuildDashboardGenerator to use HtmlReportRenderer, to take care of resource handling.

  1. … 1 more file in changeset.
Changed BuildDashboardGenerator to implement ReportRenderer.

  1. … 1 more file in changeset.
Added a description and group to the 'buildDashboard' task.

Removed deprecated ReportingBasePluginConvention.

  1. … 4 more files in changeset.
Changed a bunch of task types to inject services via properties rather than constructor, so that internal services are not made (quite so) visible to subtypes and can be added or removed in a backwards compatible way, and to defer construction of services until they are used.

  1. … 39 more files in changeset.
Removed factory methods from FileResolver, replaced by FileLookup.

  1. … 11 more files in changeset.
Rename CollectionUtils#flattenToList to flattenCollections and change it to unpack collections (and arrays), not iterables.

  1. … 5 more files in changeset.
Remove @author tags and names from source code.

- Added checkstyle check for @author

- Added not to saying that we don't use names in the codebase

  1. … 1213 more files in changeset.
Very minor tidy-ups

  1. … 3 more files in changeset.
Fixed the build dashboard handling of reports that are not available

- task is considered out-of-date when a report that was previously not available is now available, and vice versa.

  1. … 2 more files in changeset.

Fixed some merge problems.

  1. … 2 more files in changeset.
Don't need to use ConfigureDelegate to configure reports container.

Revert "Revert test changes."

This reverts commit 310eca1d7294179b537f520d05627ec060adc145.

  1. … 20 more files in changeset.