plugins

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

    • -38
    • +0
    ./ClassloaderBackedPluginDescriptorLocator.java
    • -81
    • +0
    ./DefaultExtraPropertiesExtension.java
    • -139
    • +0
    ./DefaultObjectConfigurationAction.java
    • -67
    • +0
    ./DefaultPotentialPluginWithId.java
    • -65
    • +0
    ./ExtraPropertiesDynamicObjectAdapter.java
    • -47
    • +0
    ./ImperativeOnlyPluginApplicator.java
  1. … 2531 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
    • +1
    ./ClassloaderBackedPluginDescriptorLocator.java
  1. … 225 more files in changeset.
Support authentication for pluginRepositories

    • -1
    • +2
    ./repositories/IvyPluginRepository.java
    • -1
    • +2
    ./repositories/MavenPluginRepository.java
    • -0
    • +63
    ./repositories/ScriptScopedPluginRepositoryHandler.java
  1. … 12 more files in changeset.
Cleanup javadoc for plugin repositories.

    • -1
    • +2
    ./repositories/IvyPluginRepository.java
    • -1
    • +2
    ./repositories/MavenPluginRepository.java
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
    ./repositories/GradlePluginPortal.java
    • -0
    • +5
    ./repositories/ScriptScopedPluginRepositoryHandler.java
  1. … 7 more files in changeset.
Moved classes related to dispatching property and method requests to live in their own package.

    • -4
    • +4
    ./ExtraPropertiesDynamicObjectAdapter.java
  1. … 47 more files in changeset.
Add support for Ivy plugin Repositories.

    • -0
    • +45
    ./repositories/IvyPluginRepository.java
    • -0
    • +43
    ./repositories/ScriptScopedPluginRepositoryHandler.java
  1. … 7 more files in changeset.
Get rid of unnecessary UnknownPropertyExceptions

    • -4
    • +4
    ./DefaultExtraPropertiesExtension.java
  1. … 1 more file in changeset.
Handle relative paths the "right" way.

    • -0
    • +88
    ./repositories/ScriptScopedPluginRepositoryHandler.java
  1. … 4 more files in changeset.
Narrow PluginRepositoryHandler to Iterable

- We don't want to expose all of the mutability methods of

`NamedDomainObjectList` to our API users.

Reworked `DynamicObject` to allow more efficient method lookup.

    • -5
    • +0
    ./ExtraPropertiesDynamicObjectAdapter.java
  1. … 12 more files in changeset.
Revert introduction of DefaultPluginRepositoryHandler

  1. … 10 more files in changeset.
Support the pluginRepositories {} block

  1. … 20 more files in changeset.
Reworked property write on decorated objects to use the same pattern as property read, to avoid duplicate property look up and using exceptions to detect the presence or absence of a property.

    • -10
    • +5
    ./ExtraPropertiesDynamicObjectAdapter.java
  1. … 11 more files in changeset.
Implement the result based overload of `getProperty()` for all `DynamicObject` implementations that do not yet have this implemented, to avoid a duplicate lookup on property read, for these objects.

In particular, avoid expensive unknown property lookup on convention objects.

    • -12
    • +8
    ./ExtraPropertiesDynamicObjectAdapter.java
  1. … 4 more files in changeset.
Introduce DefaultPluginRepositoryHandler

This will be wired up with the `pluginRepositories {}` block to provide

one PluginResolver for each repository defined in that block.

For now, the implementation retains the previous behavior of adding

a Maven repository based on a system property.

  1. … 10 more files in changeset.
Introduce DefaultPluginRepositoryHandler

This will be wired up with the `pluginRepositories {}` block to provide

one PluginResolver for each repository defined in that block.

For now, the implementation retains the previous behavior of adding

a Maven repository based on a system property.

  1. … 11 more files in changeset.
Add interfaces for pluginRepositories block.

- Initially, they are in `internal` packages.

- This means we don't need to worry about having JavaDoc in

the interfaces.

- We can move them to plublic locations when we're ready.

gradle/stable-plugins-dsl#17

    • -0
    • +48
    ./dsl/PluginRepositoryHandler.java
    • -0
    • +45
    ./repositories/MavenPluginRepository.java
    • -0
    • +47
    ./repositories/PluginRepository.java
Improve how we query `MetaClass` to make property reads much faster for reading unknown properties on an object, for example when searching for a dynamic property on a decorated object or when reading a property from an outer scope from inside a closure.

Specifically, use a less expensive approach to locate the meta-property for a given property, and also only attempt to avoid reading an unknown property on objects that are not dynamic, to avoid an unnecessary exception.

    • -2
    • +10
    ./ExtraPropertiesDynamicObjectAdapter.java
  1. … 2 more files in changeset.
Removed a duplicate lookup on property read of a decorated object when the property is unknown, for example when attempting to reading a property from an outer DSL closure.

This change introduces a breaking change, in that dynamic properties implemented using `propertyMissing()` are preferred over dynamic properties added as extensions, etc.

This change also means that an additional `MissingPropertyException` is thrown and swallowed on read of a dynamic property that has been added as an extension, etc. This will be cleaned up in a subsequent change.

    • -1
    • +9
    ./ExtraPropertiesDynamicObjectAdapter.java
  1. … 7 more files in changeset.
Started reworking the `DynamicObject` contract to allow property and method access without doing multiple lookups of the corresponding meta-property or meta-method.

Meta-property and meta-method lookup is expensive for missing properties or methods, for example when accessing an extension property or method on a project.

This change does not actually reduce the number of lookup, it simply moves things in this direction.

    • -0
    • +2
    ./ExtraPropertiesDynamicObjectAdapter.java
  1. … 7 more files in changeset.
Rework setting of project properties to avoid dynamic calls altogether

    • -10
    • +1
    ./DefaultExtraPropertiesExtension.java
    • -8
    • +0
    ./ExtraPropertiesDynamicObjectAdapter.java
    • -32
    • +0
    ./ExtraPropertiesExtensionInternal.java
  1. … 3 more files in changeset.
Optimize dynamic setting of extension properties

This commit introduces a short path for setting properties in extensions, avoiding to throw `MissingPropertyException` when we know that the error is going to be caught anyway.

    • -6
    • +15
    ./DefaultExtraPropertiesExtension.java
    • -0
    • +8
    ./ExtraPropertiesDynamicObjectAdapter.java
    • -0
    • +32
    ./ExtraPropertiesExtensionInternal.java
  1. … 5 more files in changeset.
Revert "Revert reuse of file snapshotter across builds (investigate failing test)"

This reverts commit 14615d32c02f514bb4fc2a578474cad2a0bda12f.

    • -138
    • +139
    ./DefaultObjectConfigurationAction.java
  1. … 12 more files in changeset.
Revert reuse of file snapshotter across builds (investigate failing test)

This reverts commit c5a7b0e10097a2165fc7aa7470df7a68d8e3c5f5 and commit 6df9c3e143038b77e53148f6a2dccfc172b1c1c9.

    • -139
    • +138
    ./DefaultObjectConfigurationAction.java
  1. … 12 more files in changeset.
Get rid of ShortCircuitEmptyScriptCompiler

This commit removes `ShortCircuitEmptyScriptCompiler` that was causing unnecessary reads of build script contents, while on the other hand being pretty weak in detecting empty scripts.

    • -138
    • +139
    ./DefaultObjectConfigurationAction.java
  1. … 10 more files in changeset.
Compose method

Allow a rule source to be applied to a model node using an `ExtractedRuleSource` instead of a `Class`.

This allows the `ExtractedRuleSource` to be contextualized in some way, for example, explicit input bindings.

+review REVIEW-5756

  1. … 9 more files in changeset.
Introduced a type to represent an inspected rule source.

Previously this was represented as a set of rule methods. Introducing a type will allow meta-data that applies to the rule source as a whole, such as implicit inputs, to be captured.

+review REVIEW-5756

  1. … 13 more files in changeset.
Moved some classes from o.g.model.internal.core to o.g.model.internal.inspect.

Also moved a class that was only used by a single test to live in that test class.

+review REVIEW-5756

  1. … 27 more files in changeset.