Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Revert the removal of `AbstractTask` methods

These methods are now deprecated. They we probably a leftover, and were

removed in 407990fb29cd59c0d1bed4769d41c259ad4f4248. However, removal

caused breaking changes in some existing builds, so we’re adding them

back as deprecated until 3.0.

    • -4
    • +19
    ./gradle/api/internal/AbstractTask.java
  1. … 1 more file 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. … 212 more files in changeset.
Replace putUnencodedChars with putString with UTF-8

- putString is faster than putUnencodedChars

Convert `AntBuilderDelegate` to Java

    • -0
    • +124
    ./gradle/api/internal/project/antbuilder/AntBuilderDelegate.java
Replace some calls to String.format with SLF4J's {}

Add some more diagnostics for cache corrupted failures

  1. … 1 more file in changeset.
Converted `AntFile*Builder`s to Java

    • -0
    • +48
    ./gradle/api/internal/file/AntFileCollectionBuilder.java
    • -38
    • +0
    ./gradle/api/internal/file/AntFileSetBuilder.groovy
    • -0
    • +50
    ./gradle/api/internal/file/AntFileSetBuilder.java
    • -0
    • +54
    ./gradle/api/internal/file/AntFileTreeBuilder.java
Convert `OptionValues` to Java

    • -0
    • +28
    ./gradle/api/internal/tasks/options/OptionValues.java
Convert `SettingsScript` to Java

    • -0
    • +39
    ./gradle/initialization/InitialPassSettingsScript.java
    • -0
    • +24
    ./gradle/initialization/SettingsScript.java
Convert `InitScript` to Java

    • -33
    • +0
    ./gradle/initialization/InitScript.groovy
    • -0
    • +34
    ./gradle/initialization/InitScript.java
Convert `DynamicPropertyNamer` to Java

It is an internal class that is only used in `AbstractProject` in

production. The only property we've been using it was "name", so changed

it to only support that.

    • -0
    • +48
    ./gradle/api/internal/DynamicPropertyNamer.java
Convert `ProjectScript` to Java

This should only be called with a Project as `scriptTarget`, so casting

like that should be fine.

    • -65
    • +0
    ./gradle/api/internal/project/ProjectScript.groovy
    • -0
    • +65
    ./gradle/api/internal/project/ProjectScript.java
Clean up of ant logging adapter

+review REVIEW-5912

  1. … 1 more file in changeset.
Fix NPE when configuring FileTree's builtBy by map (#626)

- `fileTree(dir: 'classes', builtBy: ['compile'])` is valid, and should not break

  1. … 1 more file in changeset.
Added relevant setters to `DependencyArtifact` interface to make it clear that the properties of this type are mutable, and to allow them to be mutated from languages other than Groovy.

Fixed setting property values from the dsl when there is no setter and the property is backed by a field.

  1. … 2 more files in changeset.
Apply property and method lookup improvements to more parts of the configure dsl, in particular those that use `ConfigureUtil`, which for example includes the `dependencies { }` closure.

    • -1
    • +1
    ./gradle/api/internal/AbstractPolymorphicDomainObjectContainer.java
    • -2
    • +2
    ./gradle/api/internal/NamedDomainObjectContainerConfigureDelegate.java
    • -2
    • +2
    ./gradle/api/internal/PolymorphicDomainObjectContainerConfigureDelegate.java
    • -13
    • +54
    ./gradle/util/ConfigureUtil.java
  1. … 1 more file in changeset.
Introduce `getLinkNames` on `MutableModelNode`

This avoids calling `ensureAtLeast` on target links to determine the name of the tasks.

+review REVIEW-5921

  1. … 4 more files in changeset.
Fixed incorrect logging manager being used

+review REVIEW-5921

    • -4
    • +5
    ./gradle/api/internal/AbstractTask.java
Support authentication for pluginRepositories

  1. … 11 more files in changeset.
Mark ScriptPluginFactoryProvider as @Incubating

Fixed static fields that should be final.

This commit fixes a number of static fields that were not declared final, although never updated.

    • -6
    • +6
    ./gradle/api/internal/AbstractTask.java
    • -2
    • +2
    ./gradle/api/internal/file/delete/Deleter.java
  1. … 15 more files in changeset.
Lazy initialization of dynamic objects

Not all tasks will trigger the use of the dynamic objects, so it's preferable to avoid creating one during construction: it both saves task creation time and memory.

+review REVIEW-5921

    • -8
    • +24
    ./gradle/api/internal/AbstractTask.java
Remove temporarily dead code.

- We might bring these classes back when supporting the

pluginRepositories block in init files.

Cleanup javadoc for plugin repositories.

Get rid of TaskScopeServices

The `TaskScopeServices` service was created for each task, in hope we could lazily initialize some dependents. Typically,

task inputs and outputs were created using this. However, in practice, they are always eagerly initialized during the

task creation. This leads to both increased memory usage (because each task has a companion service) and performance

penalty (because injecting services as well as calling `get` on them is expensive).

This commit replaces the use of `TaskScopeServices` with eagerly created instances.

+review REVIEW-5921

    • -13
    • +25
    ./gradle/api/internal/AbstractTask.java
  1. … 2 more files in changeset.
Introduce ScriptPluginFactoryProvider SPI

    • -0
    • +36
    ./gradle/configuration/ScriptPluginFactoryProvider.java
    • -0
    • +77
    ./gradle/configuration/ScriptPluginFactorySelector.java
  1. … 1 more file in changeset.
Support optional projects in classpath manifests

  1. … 1 more file in changeset.
Add opt-in for Gradle Plugin Portal

If the user specifies any pluginRepositories, the Plugin Portal is now

deactivated by default. It can be added with an explicit method call.

  1. … 7 more files in changeset.
Polish BuildScopeServices

  1. … 1 more file in changeset.