KotlinScriptEvaluator.kt

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Emit type-safe accessors for plugins in the compile classpath

  1. … 17 more files in changeset.
Move kotlin-dsl in a sub directory

  1. … 1579 more files in changeset.
Remove kotlin-eap repository

now that Kotlin 1.3-RC4 is on gradlePluginPortal() and jcenter()

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

  1. … 3 more files in changeset.
Introduce type-safe accessors for plugin ids

Starting with this commit, the Kotlin DSL will generate type-safe

accessors for all plugin ids found in the `buildSrc` classpath.

So instead of writing:

```kotlin

plugins {

id("gradlebuild.strict-compile")

id("gradlebuild.classcycle")

}

```

One can write:

```kotlin

plugins {

gradlebuild.`strict-compile`

gradlebuild.classcycle

}

```

All while enjoying content assist and source code navigation all the

way down to the plugin implementation class.

  1. … 17 more files in changeset.
Always add `kotlinEap()` to the list of plugin repositories

Upgrade Kotlin to 1.3-rc-51

  1. … 3 more files in changeset.
Touch up `KotlinScriptEvaluator`

Touch up `KotlinScriptEvaluator`

- Organize imports

- Remove unused ConfigurationTargetIdentifier

Add initial func test support for script compile build ops

  1. … 4 more files in changeset.
Don't automatically add `kotlin-(dev|eap)` repositories to builds

  1. … 2 more files in changeset.
Move `BuildCacheController` integration to `ScriptCache`

  1. … 2 more files in changeset.
Move kotlinEap() to internals

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

  1. … 3 more files in changeset.
Remove usages of kotlinDev()

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

  1. … 1 more file in changeset.
Register both kotlin-dev and kotlin-eap repositories

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

  1. … 2 more files in changeset.
Preserve and return a proper `OriginTaskExecutionMetadata` value

That's better behaviour but it still doesn't fix the interaction with

the `build-scan` plugin. That will require removing an assumption from

the plugin about caching operations only happening during task

execution.

  1. … 4 more files in changeset.
Make `KotlinBuildScriptModelBuilder` resilient against exceptions

Particularly against exceptions happening during script classpath

computation.

  1. … 3 more files in changeset.
Let `Project` scripts be cached in the Gradle build cache

If the build cache is enabled and the Gradle property

`org.gradle.kotlin.dsl.caching.buildcache` is set to true.

  1. … 12 more files in changeset.
Add `KotlinScriptHost<*>` parameter to `cachedDirFor`

In preparation for the build cache integration.

  1. … 2 more files in changeset.
Make the script compilation cache relocatable

By storing the post-processed second stage script text as a constant

in the emitted bytecode instead of keeping it in an external file.

  1. … 6 more files in changeset.
Don't store original script path in the residual program

But take it from the given `ScriptSource` and cache it in the script

host.

  1. … 5 more files in changeset.
Add `TODO:kotlin-eap` marker to `addKotlinDevRepository()`

Add `TODO:kotlin-eap` markers

  1. … 6 more files in changeset.
Let every `settings.gradle.kts` add the `kotlinDev()` repository

In order to make the upgrade to a Kotlin DSL snapshot distro easier.

This behaviour makes sense as long as there are dependencies on Kotlin

pre-release versions.

  1. … 22 more files in changeset.
expose script compilation as build operation

  1. … 4 more files in changeset.
Bump script cache version

Avoid setting up the embedded Kotlin repository

The embedded Kotlin repository and the version of the embedded

libraries don't need to be configured for:

- script plugins without a `buildscript` / `initscript` block, for no

libraries will ever be resolved

- top-level `Settings` scripts without a `buildscript` block

  1. … 7 more files in changeset.
Emit progress logger operation around script compilation

  1. … 3 more files in changeset.
Add accessors classpath to cached dir key

  1. … 4 more files in changeset.
Move decision of computing accessors classpath to specialized program

And make the accessors classpath hash part of `ProgramId`.

  1. … 5 more files in changeset.
Remove unnecessary `printStackTrace`