Gradle

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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
    • +143
    /buildSrc/src/main/kotlin/codegen/ActionExtensionWriter.kt
    • -0
    • +56
    /buildSrc/src/main/kotlin/codegen/KDocProvider.kt
    • -0
    • +122
    /buildSrc/src/test/kotlin/codegen/GenerateActionExtensionsTest.kt
    • -0
    • +46
    /buildSrc/src/test/kotlin/codegen/MethodSignatureTest.kt
  1. … 13 more files in changeset.
Polish `KotlinScriptPluginFactory`

Extract explaining methods

Polish `KotlinBuildScriptCompiler`

Extract explaining method

Fix compilation issue

Bump up version of plugin

Fix a bug in the plugin code.

Purposelessly introduce compilation issue for testing build tagging step

Decouple tagging functionality from Gradle core build

Doing so ensures that code issues in buildSrc won't prevent that the tagging task can be executed.

Bump up plugin version

The plugin does not automatically trigger the tagging operation anymore if build fails. It will require an additional build step that runs the provided tagging task.

Added `IncludedBuildInternal.execute(tasks)`

Switched `CompositeProjectArtifactBuilder` to use this, so that now

all build controlling for an included build is done via the

`IncludedBuildInternal` interface.

Fix missing code from commit

Convert ListenerBroadcastTest from JMock to Spock

+review REVIEW-6168

Add Vladislav Bauer as contributor

#685

+review REVIEW-6169

    • -0
    • +1
    /subprojects/docs/src/docs/release/notes.md
Make it easier to use the heapdump option.

Update Gson library 2.2.4 -> 2.4 (#685)

Pass `channel` from the coordinator to the workers and report generator

Improve the usability of heap dumps for performance test builds

- support passing -Porg.gradle.performance.heapdump=all

- add javadoc to HeapDumper mentioning cli usage

Ignore Jacoco integration tests for JDK 9

Missed a test in BuildDashboardPluginIntegrationTest -

the other tests have already been ignored.

The latest Jacoco 0.7.8-SNAPSHOT seems to work.

Fix native binaries documentation around platform variant axis selection

Starting with Gradle 2.3, binaries for all declared platforms are not

built anymore. Only the 'current' platform is used. One have to

explicitly declare the `targetPlatform`s on components.

This commit fixes one paragraph in the Native Binaries chapter of the

user guide that still contained an affirmation describing the old

behaviour.

Take snapshots for a property

+review REVIEW-6141

Remove older or slower baselines - The 1.1 baseline is only faster because of setup/teardown time. - The 2.2.1 and 2.8 baselines aren't really interesting because they aren't comparatively fast. - We will still get historical information for some of these releases in the weekly "historical" performance test runs.

Introduce "replaced" change type

With order-sensitive file collection snapshots we can now detect files that have been replaced by other files.

+review REVIEW-6141

Fix unit tests

Add `channel` to the performance test execution database

The `channel` column introduced by this commit allows us to put the tests into different

"channels", where a channel corresponds to a type of build: daily, commit by commit builds

(the default `commits` channel), ad-hoc builds (`adhoc`) or historical builds (`historical`).

The channel is controlled thanks to the `org.gradle.performance.execution.channel` system

property.

  1. … 6 more files in changeset.
Refactor code for better readability

Each file collection snapshot is in its own top-level class now, with the respective serializer declared as an inner class.

+review REVIEW-6141

Remove older or slower baselines - The 1.1 baseline is only faster because of setup/teardown time. - The 2.2.1 and 2.8 baselines aren't really interesting because they aren't comparatively fast. - We will still get historical information for some of these releases in the weekly "historical" performance test runs.

Update the wrapper to 3.0 release

    • -2
    • +2
    /gradle/wrapper/gradle-wrapper.properties
Add explicit return

Fix passing change id to worker build

Convert TestMainActionTest from JMock to Spock

Fix error