plugin

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Restore `build-scan` plugin syntax in Kotlin scripts

Closes #11095

  1. … 1 more file in changeset.
Integrate with Gradle Enterprise plugin 3.0 (#11041)

    • -0
    • +45
    ./management/internal/MergedPluginRequests.java
    • -0
    • +43
    ./management/internal/MultiPluginRequests.java
    • -4
    • +28
    ./management/internal/PluginRequests.java
    • -0
    • +39
    ./management/internal/SingletonPluginRequests.java
    • -0
    • +47
    ./management/internal/autoapply/AutoAppliedGradleEnterprisePlugin.java
    • -2
    • +1
    ./use/internal/PluginRequestCollector.java
  1. … 45 more files in changeset.
Fail better when using --scan and an old incompatible scan plugin

  1. … 3 more files in changeset.
Fix test

    • -2
    • +1
    ./use/internal/PluginRequestCollector.java
  1. … 2 more files in changeset.
Update scan support for Gradle Enterprise plugin 3.0

Gradle 6 is now only compatible with this plugin.

    • -0
    • +45
    ./management/internal/MergedPluginRequests.java
    • -0
    • +43
    ./management/internal/MultiPluginRequests.java
    • -4
    • +28
    ./management/internal/PluginRequests.java
    • -0
    • +39
    ./management/internal/SingletonPluginRequests.java
    • -0
    • +45
    ./management/internal/autoapply/AutoAppliedGradleEnterprisePlugin.java
    • -2
    • +2
    ./use/internal/PluginRequestCollector.java
  1. … 28 more files in changeset.
Make paths/names of included builds immutable (#10998)

Changes the “build path” for included builds to be determined at inclusion time based on the directory name, or a user supplied override. Previously, we tried to use the root project name defined in the included build. This caused a lot of complexity due to it not being known until part way through building the included build.

This change also disallows use of `buildSrc` as a project name, as it collides with the `buildSrc` nested build.

    • -0
    • +23
    ./management/internal/PluginRequests.java
    • -1
    • +1
    ./use/internal/PluginRequestCollector.java
  1. … 70 more files in changeset.
Make paths/names of included builds immutable

    • -0
    • +23
    ./management/internal/PluginRequests.java
    • -1
    • +1
    ./use/internal/PluginRequestCollector.java
  1. … 30 more files in changeset.
Remove unused

    • -26
    • +0
    ./internal/IllegalPluginApplyFalseException.java
Update auto apply scan plugin to 2.4.2 (#10535)

  1. … 2 more files in changeset.
Update auto apply scan plugin to 2.4.2

  1. … 2 more files in changeset.
Update auto apply scan plugin to 2.4.2

  1. … 2 more files in changeset.
Support plugins {} in settings scripts

    • -0
    • +36
    ./use/internal/PluginsAwareScript.java
  1. … 10 more files in changeset.
Support plugins {} in settings scripts

    • -0
    • +36
    ./use/internal/PluginsAwareScript.java
  1. … 9 more files in changeset.
Support plugins {} in settings scripts

    • -0
    • +36
    ./use/internal/PluginsAwareScript.java
  1. … 9 more files in changeset.
Update default scan plugin version to 2.4.1

  1. … 2 more files in changeset.
Update default scan plugin version to 2.4.1

  1. … 2 more files in changeset.
Update build scan plugin version to 2.4

Signed-off-by: Volker Leck <volker@gradle.com>

  1. … 2 more files in changeset.
Update build scan plugin version to 2.4

Signed-off-by: Volker Leck <volker@gradle.com>

  1. … 2 more files in changeset.
Apply `Anonymous type can be replaced with lambda` inspection the whole project

    • -13
    • +2
    ./use/internal/PluginRequestCollector.java
  1. … 666 more files in changeset.
Apply `'if' replaceable with 'switch'` inspection the whole project

    • -36
    • +41
    ./use/internal/PluginUseScriptBlockMetadataCompiler.java
  1. … 8 more files in changeset.
Apply `'if' replaceable with 'switch'` inspection the whole project

    • -36
    • +41
    ./use/internal/PluginUseScriptBlockMetadataCompiler.java
  1. … 8 more files in changeset.
Apply `Explicit type can be replaced with <>` inspection the whole project

    • -1
    • +1
    ./use/internal/PluginRequestCollector.java
  1. … 909 more files in changeset.
Forbid the use of `apply: false` for plugins in settings scripts

    • -0
    • +26
    ./internal/IllegalPluginApplyFalseException.java
    • -2
    • +44
    ./use/internal/PluginRequestCollector.java
  1. … 12 more files in changeset.
Allow property replacement in version strings in the `plugins` block

Fixes #1697

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

Fixes #1697

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

- Reuse `id(String, int)`

    • -3
    • +1
    ./use/internal/PluginRequestCollector.java
Polish `PluginRequestCollector`

- Reuse `id(String, int)`

    • -3
    • +1
    ./use/internal/PluginRequestCollector.java
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.

    • -60
    • +0
    ./management/internal/PluginRequestsSerializer.java
    • -32
    • +5
    ./use/internal/PluginUseScriptBlockMetadataExtractor.java
  1. … 6 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.

    • -43
    • +57
    ./use/internal/PluginRequestCollector.java
    • -0
    • +4
    ./use/internal/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
    • +33
    ./internal/InvalidPluginVersionException.java
    • -1
    • +11
    ./use/internal/PluginRequestCollector.java
    • -0
    • +127
    ./use/internal/PluginUseScriptBlockMetadataCompiler.java
    • -140
    • +0
    ./use/internal/PluginUseScriptBlockMetadataExtractor.java
  1. … 2 more files in changeset.