KotlinBuildScriptCompiler.kt

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Merge pull request #882 from gradle/bamboo/develop/script-plugin-classpath

Provide correct classpath for script plugins with buildscript blocks

  1. … 8 more files in changeset.
Extract lower-level `KotlinScriptFactory` service

So it can be used to evaluate standalone script plugins in order to

serve their compilation classpaths to the IDE.

  1. … 4 more files in changeset.
Remove unnecessary parameter from `KotlinScript` functional type

The target object is already captured in the `scriptTarget`.

  1. … 1 more file in changeset.
Compute buildscript block compilation classpath lazily

Introduce `unsafeLazy` to replace `lazy` wherever possible

And remove the unnecessary thread synchronization overhead.

  1. … 5 more files in changeset.
Remove unnecessary `ClassPath` union

`buildscriptBlockCompilationClassPath` is already implied by the

`targetScope` classpath.

Normalise line separators of strings given to the Kotlin lexer

Fixes #858

  1. … 2 more files in changeset.
Compute script compilation classpath from target `ClassLoaderScope`

Instead of `scriptHandler.scriptClassPath` so plugin implementations

coming from other loaders, as it is the case with plugins tested via

TestKit's `withPluginClasspath`, are also added to the compilation

classpath.

See #492

  1. … 1 more file in changeset.
Polish `KotlinBuildScriptCompiler`

- Split query from default value

Address review comments

  1. … 1 more file in changeset.
Location aware exceptions for script evaluation errors

  1. … 2 more files in changeset.
pluginManagement block cannot appear twice in a settings script

Merge pull request #769 from gradle/eskatos/settings/single-pluginManagement

  1. … 2 more files in changeset.
Polish KotlinBuildScriptCompiler

Polish KotlinBuildScriptCompiler

by favoring org.gradle.util.TextUtil over shaded openapi import

Refine KotlinBuildScriptCompiler

by moving block ranges extraction to lazy fields

Refine KotlinBuildScriptCompiler

by renaming methods for clarity

and moving plugins range extraction up

Do not extract buildscript/plugins block twice each

  1. … 2 more files in changeset.
Polish KotlinBuildScriptCompiler

by making compile() and compileForClassPath() functions symetric

Allow to cross-configure buildscript {}

Build scripts body is cleared out of the effective buildscript block

Build script template plugins {} function throws

Project buildscript extension does the right thing

This commit does the buildscript block extraction twice, to be fixed.

  1. … 6 more files in changeset.
Fail when the plugins {} block is non top-level

Build scripts body is cleared out of the effective plugins block if any

Build script template plugins {} function throws

This commit does the plugins block extraction twice, to be fixed.

  1. … 4 more files in changeset.
lint: property accessor on new line

  1. … 3 more files in changeset.
lint: missing new line before ")"

  1. … 42 more files in changeset.
lint: visibility modifiers on their own line

  1. … 10 more files in changeset.
Take target object from the host

  1. … 8 more files in changeset.
Polish `KotlinScriptTarget`

- Remove redundant information

- Remove redundant `evalBuildscriptBlock`

  1. … 1 more file in changeset.
Make `ScriptHandler` available to the script via `KotlinScriptHost`

  1. … 7 more files in changeset.
Serve the correct editor classpath for init scripts

Init scripts only see the core Gradle Kotlin DSL classpath (Gradle API + Kotlin

DSL API) and whatever is contributed to the `initscript` classpath

dependencies.

See #663

    • -72
    • +182
    ./KotlinBuildScriptCompiler.kt
  1. … 5 more files in changeset.
Remove unused parameter

  1. … 1 more file in changeset.
Introduce ClassPathModeExceptionCollector

build scoped.

  1. … 3 more files in changeset.
Remove spurious empty line