Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Renamed src/main/groovy to src/main/java in core

    • -66
    • +0
    ./ExtensiblePolymorphicDomainObjectContainer.java
    • -194
    • +0
    ./NamedDomainObjectCollection.java
  1. … 2531 more files in changeset.
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.

  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
    • +1
    ./internal/AbstractClassGenerator.java
    • -1
    • +1
    ./internal/AbstractNamedDomainObjectContainer.java
    • -1
    • +1
    ./internal/AsmBackedClassGenerator.java
    • -1
    • +1
    ./internal/DefaultNamedDomainObjectCollection.java
    • -1
    • +1
    ./internal/DefaultNamedDomainObjectSet.java
    • -1
    • +1
    ./internal/artifacts/DefaultArtifactRepositoryContainer.java
    • -1
    • +1
    ./internal/component/ArtifactType.java
    • -1
    • +1
    ./internal/file/DefaultFileTreeElement.java
    • -1
    • +1
    ./internal/file/archive/TarFileTree.java
    • -1
    • +1
    ./internal/file/archive/ZipFileTree.java
  1. … 212 more files in changeset.
Replace putUnencodedChars with putString with UTF-8

- putString is faster than putUnencodedChars

    • -2
    • +3
    ./internal/file/FileTreeElementHasher.java
Convert `AntBuilderDelegate` to Java

    • -0
    • +124
    ./internal/project/antbuilder/AntBuilderDelegate.java
Converted `AntFile*Builder`s to Java

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

    • -0
    • +28
    ./internal/tasks/options/OptionValues.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.

    • -47
    • +0
    ./internal/DynamicPropertyNamer.groovy
    • -0
    • +48
    ./internal/DynamicPropertyNamer.java
    • -2
    • +2
    ./internal/NoNamingPropertyException.java
    • -2
    • +2
    ./internal/NullNamingPropertyException.java
Convert `ProjectScript` to Java

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

like that should be fine.

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

+review REVIEW-5912

    • -24
    • +19
    ./internal/project/ant/AntLoggingAdapter.java
  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.

    • -5
    • +30
    ./artifacts/DependencyArtifact.java
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
    ./internal/AbstractNamedDomainObjectContainer.java
    • -1
    • +1
    ./internal/AbstractPolymorphicDomainObjectContainer.java
    • -2
    • +2
    ./internal/NamedDomainObjectContainerConfigureDelegate.java
    • -2
    • +2
    ./internal/PolymorphicDomainObjectContainerConfigureDelegate.java
    • -1
    • +1
    ./internal/TypedDomainObjectContainerWrapper.java
    • -22
    • +4
    ./internal/tasks/DefaultTaskContainer.java
  1. … 3 more files in changeset.
Introduce `getLinkNames` on `MutableModelNode`

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

+review REVIEW-5921

    • -5
    • +23
    ./internal/tasks/DefaultTaskContainer.java
  1. … 4 more files in changeset.
Fixed incorrect logging manager being used

+review REVIEW-5921

Support authentication for pluginRepositories

  1. … 12 more files in changeset.
Fixed static fields that should be final.

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

  1. … 18 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

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

  1. … 4 more files 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.

    • -0
    • +23
    ./internal/plugins/repositories/GradlePluginPortal.java
  1. … 7 more files in changeset.
Added back an old class that is exposed in the bytecode of compiled tasks.

    • -0
    • +1
    ./internal/AbstractPolymorphicDomainObjectContainer.java
    • -0
    • +1
    ./internal/DefaultNamedDomainObjectCollection.java
    • -0
    • +1
    ./internal/ExtensibleDynamicObject.java
Moved classes related to dispatching property and method requests to live in their own package.

    • -198
    • +0
    ./internal/AbstractDynamicObject.java
    • -0
    • +1
    ./internal/AbstractNamedDomainObjectContainer.java
    • -2
    • +3
    ./internal/AbstractPolymorphicDomainObjectContainer.java
    • -0
    • +3
    ./internal/AsmBackedClassGenerator.java
    • -404
    • +0
    ./internal/BeanDynamicObject.java
    • -117
    • +0
    ./internal/CompositeDynamicObject.java
    • -125
    • +0
    ./internal/ConfigureDelegate.java
    • -2
    • +3
    ./internal/DefaultNamedDomainObjectCollection.java
    • -4
    • +5
    ./internal/ExtensibleDynamicObject.java
  1. … 35 more files in changeset.
Reverted change to expose the target container to named object container configure closures, to switch back to exposing the `ConfigureDelegate` wrapper instead.

Make this change in Gradle 3.0 instead.

    • -1
    • +3
    ./internal/AbstractNamedDomainObjectContainer.java
  1. … 2 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.

    • -3
    • +2
    ./internal/AbstractNamedDomainObjectContainer.java
    • -1
    • +1
    ./internal/AbstractPolymorphicDomainObjectContainer.java
    • -2
    • +1
    ./internal/TypedDomainObjectContainerWrapper.java
    • -1
    • +1
    ./internal/artifacts/DefaultArtifactRepositoryContainer.java
    • -2
    • +1
    ./internal/tasks/DefaultTaskContainer.java
  1. … 7 more files in changeset.
Simplified the interaction between `ConfigureDelegate` and its subclasses, and improved the 'missing property' and 'missing method' exceptions thrown by `ConfigureDelegate`.

    • -16
    • +34
    ./internal/ConfigureDelegate.java
    • -0
    • +16
    ./internal/ExtensibleDynamicObject.java
    • -6
    • +5
    ./internal/NamedDomainObjectContainerConfigureDelegate.java
    • -13
    • +8
    ./internal/PolymorphicDomainObjectContainerConfigureDelegate.java
Fix TaskStateInternal's description

  1. … 1 more file in changeset.
Simplify FileNormaliser

    • -17
    • +18
    ./internal/file/FileNormaliser.java
  1. … 1 more file in changeset.
Cache AbstractProject.getBuildDir()

    • -1
    • +7
    ./internal/project/AbstractProject.java