internal

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Forbid the use of `apply: false` for plugins in settings scripts

  1. … 13 more files in changeset.
Allow property replacement in version strings in the `plugins` block

Fixes #1697

    • -14
    • +46
    ./PluginUseScriptBlockMetadataCompiler.java
  1. … 3 more files in changeset.
Allow property replacement in version strings in the `plugins` block

Fixes #1697

    • -14
    • +46
    ./PluginUseScriptBlockMetadataCompiler.java
  1. … 3 more files in changeset.
Polish `PluginRequestCollector`

- Reuse `id(String, int)`

Polish `PluginRequestCollector`

- Reuse `id(String, int)`

Execute the `plugins` block in order to extract plugin requests

Previously, we were extracting `PluginRequests` when compiling a build script,

using AST transforms. This prevented any sort of dynamic behaviour within the

plugins block, such as reading plugin versions from a properties file.

This behaviour was by design, and the syntax of the plugins block was explicitly

restricted to ensure the plugin requests were statically defined.

This restricted syntax has been the cause of much user angst, and the expected

benefits of a truly imperative plugins block have not eventuated. Furthermore,

the implementation of `plugins` in the Kotlin DSL does not add the same

restrictions.

With this change, the `plugins` block is actually invoked to extract any plugin

requests. While the restricted syntax remains (for now), this change opens up

the possibility of supporting property replacement for version numbers and other

dynamic behaviour.

One limitation of this change is that the line number of each plugin request

is not captured correctly: the line number is always reportes as 0 for any

request. Several tests are failing due to this limitation.

    • -32
    • +5
    ./PluginUseScriptBlockMetadataExtractor.java
  1. … 7 more files in changeset.
Record line numbers for each plugin request

When compiling, transform each `id(String)` method call into

`id(String, int)`, allowing the line number to be captured.

As the syntax of the plugins block is still completely restricted,

there is no risk of another `id` method being incorrectly transformed.

If/when we decide to relax the restrictions on syntax, we'll need to

do something smarter here.

    • -0
    • +4
    ./PluginUseScriptBlockMetadataCompiler.java
Validate plugin request values when invoking plugins block

This is a further change toward allowing the plugins block to support

property replacement or other dynamic features. Instead of validating

the plugin id and version values when compiling the script, we now

perform this validation when these values are extracted, during

invocation of the `plugins` block.

    • -0
    • +127
    ./PluginUseScriptBlockMetadataCompiler.java
    • -140
    • +0
    ./PluginUseScriptBlockMetadataExtractor.java
  1. … 3 more files in changeset.
Use AST to record plugin application line numbers

  1. … 1 more file in changeset.
Use AST to record plugin application line numbers

  1. … 1 more file in changeset.
Use AST to record plugin application line numbers

  1. … 1 more file in changeset.
Hacky way to preserve line numbers

  1. … 3 more files in changeset.
Use pluginsBlock line number

  1. … 3 more files in changeset.
SPIKE: allow property replacement in plugin versions

    • -12
    • +40
    ./PluginUseScriptBlockMetadataCompiler.java
  1. … 2 more files in changeset.
Use method reference, where applicable

  1. … 169 more files in changeset.
Use method reference, where applicable

  1. … 167 more files in changeset.
Organize imports

  1. … 339 more files in changeset.
Replace anonymous classes with lambdas

  1. … 711 more files in changeset.
Replace anonymous classes with lambdas

  1. … 695 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +1
    ./PluginUseScriptBlockMetadataExtractor.java
  1. … 901 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +1
    ./PluginUseScriptBlockMetadataExtractor.java
  1. … 901 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +1
    ./PluginUseScriptBlockMetadataExtractor.java
  1. … 889 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +1
    ./PluginUseScriptBlockMetadataExtractor.java
  1. … 896 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +1
    ./PluginUseScriptBlockMetadataExtractor.java
  1. … 901 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +1
    ./PluginUseScriptBlockMetadataExtractor.java
  1. … 901 more files in changeset.
Add missing @Override to public api types

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 341 more files in changeset.
Fix error reporting for duplicate plugin application

Previously, when we detected a duplicate plugin application, we would

always report the location of the first plugin applied, regardless of which

plugin that was. This led to nonsensical errors about a plugin being applied

at a location that pointed to a completely different plugin.

Now, we report the location of the first application of the plugin that was

duplicated.

  1. … 1 more file in changeset.
Document `PluginRequestApplication#applyPlugins`

Limit PluginRequests instantiations & short-circuit when empty

  1. … 4 more files in changeset.
Remove types and support for org.gradle.plugin.use.PluginDependenciesSpec

  1. … 5 more files in changeset.