plugins

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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.
Introduced `RuleSourceSchema` to represent the result of inspecting a `RuleSource`.

+review REVIEW-5756

  1. … 4 more files in changeset.
Simplified extracted rules a bit

+review REVIEW-5620

  1. … 8 more files in changeset.
Prevents decorated subtypes from being used as model node types.

+review REVIEW-5526

  1. … 3 more files in changeset.
Extracted a ScriptTarget type out of DefaultScriptPluginFactory, to encapsulate the target specific behaviour. Also removed some parameters from ScriptPluginFactory.create() that are implied by other parameters.

    • -2
    • +1
    ./DefaultObjectConfigurationAction.java
  1. … 18 more files in changeset.
Allow using hasPlugin() or similar in a plugin application callback.

  1. … 1 more file in changeset.
Release no longer needed script runtime classloaders.

+review REVIEW-5411

    • -1
    • +1
    ./DefaultObjectConfigurationAction.java
  1. … 23 more files in changeset.
GRADLE-3249 - Don't fire pluginManager.withPlugin() callbacks until after the plugin has been “applied”.

+review

  1. … 1 more file in changeset.
Push replaceOrCreate to model registry.

Realligned some other model registry methods.

+review REVIEW-5382

  1. … 14 more files in changeset.
Pull the error for trying to create model nodes as scopes other than root “up”.

+review REVIEW-5353

  1. … 26 more files in changeset.
Added method to ClassLoaderScope to efficiently check whether a Class is defined by a given scope, without needing to construct the ClassLoaders for the scope.

Use this in DefaultPluginRegistry to decide whether to inspect a class or not.

  1. … 6 more files in changeset.
Changed plugin registry so that it queries its parent when inspecting a type before attempting to inspect the type itself. Previously, every registry was inspecting each type, which is practice means that no caching was actually being done.

Also changed DefaultPluginRegistry so that it is always backed by a ClassLoaderScope. Changed the root ClassLoaderScope so that its local ClassLoader is the core plugins ClassLoader.

  1. … 12 more files in changeset.
Some internal reorganisation of DefaultPluginManager.

  1. … 1 more file in changeset.