support

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Generate builtin plugin id extensions

See #168

  1. … 8 more files in changeset.
Add missing file headers

See #186

  1. … 1 more file in changeset.
Support the `plugins` block :tada:

We use a new type - `KotlinPluginDependenciesHandler` - as the target

for the top-level plugins block instead of the core type

`PluginDependenciesSpec` so we can annotate it with a `@DslMarker`

annotation - `@BuildScriptBlockMarker` - in the hopes that once IntelliJ

starts recognising it, the code completion experience will be better.

Better documentation comments and validation will come in subsequent

commits.

See #186

    • -0
    • +10
    ./KotlinPluginsBlock.kt
  1. … 10 more files in changeset.
Pass kotlin-stdlib.jar path to the compiler

For 1.1-M03 no longer references the stdlib jar implicitly.

See #187

  1. … 1 more file in changeset.
Update wrapper to latest snapshot distro

  1. … 12 more files in changeset.
Compute correct classpath for sub-project build script

Resolves #130

    • -3
    • +1
    ./KotlinBuildScriptDependenciesResolver.kt
    • -104
    • +0
    ./KotlinBuildScriptModelProvider.kt
    • -0
    • +62
    ./KotlinBuildScriptModelRequest.kt
    • -0
    • +52
    ./SourcePathProvider.kt
  1. … 4 more files in changeset.
Compute correct project root before requesting classpath

This allows opening a script file from a project different than the

one currently imported and still edit it with the correct classpath.

For instance, with this commit, build scripts under `samples/` can be

edited with the correct classpath.

Resolves #181

    • -3
    • +24
    ./KotlinBuildScriptDependenciesResolver.kt
  1. … 2 more files in changeset.
Polish script dependency resolution code

* Remove deprecated support for Kotlin IDEA 1.1-M01

* Pass script file path all the way down to the model builder in

preparation for better multi-project classpath computation

See #130

    • -0
    • +23
    ./ImplicitImports.kt
    • -0
    • +148
    ./KotlinBuildScriptDependenciesResolver.kt
    • -0
    • +104
    ./KotlinBuildScriptModelProvider.kt
  1. … 6 more files in changeset.
Remove ScriptTemplateDefinition annotation from KotlinBuildscriptBlock

To avoid confusing IDEs that rely on that information to decide what's

the correct template definition for a script based on its file name pattern.

  1. … 1 more file in changeset.
Preserve build script file name in cached classes

See #172

  1. … 4 more files in changeset.
Refer to buildscript *blocks* instead of *sections*

And consistenly use a lower-case `s` in the middle of the word when

referring to just the block and an upper-case `S` when referring to the

script file as a whole.

    • -0
    • +39
    ./KotlinBuildscriptBlock.kt
  1. … 6 more files in changeset.
Cache compiled scripts

- Introduce CachingKotlinCompiler

- Add compilation ClassPath (as ClassLoader) to cache key

- Add version number to script cache

- Honor `--recompile-scripts`

- Report compilation progress

Resolves #31

  1. … 5 more files in changeset.
Revert back to using method references after upgrade

The compiler errors were just a side-effect of using the dev version of

the compiler with the 1.1-M01 runtime.

  1. … 4 more files in changeset.
Upgrade to Kotlin 1.1-M02 :tada:

Resolves #164

  1. … 8 more files in changeset.
Upgrade to Kotlin 1.1.0-dev-3584

On our way to 1.1-M02.

See #164

  1. … 1 more file in changeset.
Introduce `gradleScriptKotlinApi()` dependency

Resolves #118

  1. … 2 more files in changeset.
Optimize `KotlinBuildScriptModelBuilder#canBuild`

Import java.lang exceptions for compatibility with Kotlin plugin

Version 1.1.0-dev-3687

  1. … 6 more files in changeset.
Normalise file separators in jar entries

Zip file entries *must* spell the file separator as `/` regardless of

the platform.

See #147

Hide KotlinCompiler functions from IDE

Mainly to avoid confusion with content assist.

Report API jar generation progress

Resolves #116

    • -0
    • +23
    ./ProgressMonitor.kt
  1. … 9 more files in changeset.
Extract `ApiJar` and `ApiExtensionsJar` modules

See: #117

    • -0
    • +160
    ./KotlinCompiler.kt
  1. … 7 more files in changeset.
Support navigating to generated extensions sources

See #117

  1. … 4 more files in changeset.
Serve script model even if no Kotlin script runs

Resolves #113

    • -0
    • +68
    ./KotlinBuildScriptModelBuilder.kt
  1. … 6 more files in changeset.
Address code review feedback from @cbeams

- Rename `requiresExtension` to `conflictsWithExtensions`

- Rename `eraseMethodsMatching` to `removeMethodsMatching`

  1. … 7 more files in changeset.
Compile scripts against generated Kotlin API jar

We would like Kotlin build scripts to behave as if all the `Action<T>`

parameters in the Gradle API had been declared as `T.() -> Unit` to

avoid the need for explicitly qualifying the single argument to the

given lambda expressions with `it`.

In other words, we would like users to be writing code like:

copySpec {

from("src")

into("out")

}

Instead of:

copySpec {

it.from("src")

it.into("out")

}

Where `copySpec` is declared in the Gradle Java API as:

CopySpec copySpec(Action<? super CopySpec> configuration)

So far we have been able to avoid the qualifying `it` in some situations

via mindful use of inheritance and Kotlin extensions but a comprehensive

solution was still lacking. The underlying issue is that while Kotlin

does provide a type extension mechanism, type members still take

precedence over extensions and currently there's no mechanism to

instruct Kotlin otherwise.

In the future we might be able to implement a different solution to this

particular issue via a new Kotlin language feature still in discussion:

- https://youtrack.jetbrains.com/issue/KT-12848

In the meantime, by giving the Kotlin compiler a carefully crafted API

jar with all members that could potentially conflict with our provided

extensions removed we can work around the fact that interface members

take precedence over extension members and expose all the extensions we

want.

And that is the solution implemented in this commit:

- Remove all API methods that take a last `Action<T>` parameter

- Generate shim extensions that take a last `T.() -> Unit`

Proper treatment for generic types will be implemented in a future

commit.

Resolves: #52

See also: #54, #117

    • -0
    • +107
    ./asm/primitives.kt
  1. … 27 more files in changeset.
Compile against generated Gradle API jar

    • -47
    • +0
    ./KotlinScriptDefinitionProvider.kt
  1. … 2 more files in changeset.
Insert line break for readability

Preserve compatibility with Kotlin Plugin 1.1-M01

By always retrieving the model when `getScriptSectionTokens` is not

available.

  1. … 3 more files in changeset.
Fix navigation to sources of `buildSrc` types

With tests this time to make sure it won't be lost again.

  1. … 1 more file in changeset.