org

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Merge pull request #885 from gradle/bamboo/fix-accessors-caching

Add generated accessors jar to the loaded script cache key

  1. … 1 more file in changeset.
Move all subprojects to the `subprojects` directory

    • -25
    • +0
    ./gradle/kotlin/dsl/ActionExtensions.kt
    • -39
    • +0
    ./gradle/kotlin/dsl/ConfigurableFileCollectionExtensions.kt
    • -34
    • +0
    ./gradle/kotlin/dsl/ConfigurationExtensions.kt
    • -72
    • +0
    ./gradle/kotlin/dsl/ConventionExtensions.kt
    • -30
    • +0
    ./gradle/kotlin/dsl/CopySpecExtensions.kt
    • -199
    • +0
    ./gradle/kotlin/dsl/DependencyHandlerScope.kt
    • -33
    • +0
    ./gradle/kotlin/dsl/GradleExtensions.kt
    • -238
    • +0
    ./gradle/kotlin/dsl/GroovyInteroperability.kt
  1. … 507 more files in changeset.
Merge pull request #882 from gradle/bamboo/develop/script-plugin-classpath

Provide correct classpath for script plugins with buildscript blocks

    • -0
    • +21
    ./gradle/kotlin/dsl/provider/BuildServices.kt
  1. … 4 more files in changeset.
Polish `KotlinScriptFactory`

- Organize imports

- Rename function for clarity

- Rename parameter for clarity

- Favor block form for `if` statement

    • -0
    • +2
    ./gradle/kotlin/dsl/provider/BuildServices.kt
Remove the now unnecessary `initScriptClassPathFor` function

And simplify `BuildscriptBlockEvaluator`.

Skip the script body when computing the classpath of a script plugin

The body of script plugins will still be executed when they are

applied from other scripts as they might affect the classpath of the

applying script.

  1. … 3 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
    • +20
    ./gradle/kotlin/dsl/provider/BuildServices.kt
    • -0
    • +544
    ./gradle/kotlin/dsl/provider/KotlinScriptCompiler.kt
    • -0
    • +97
    ./gradle/kotlin/dsl/provider/KotlinScriptFactory.kt
Remove unnecessary parameter from `KotlinScript` functional type

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

Move `getByName(String, KClass<T>)` extension to `NamedDomainObjectCollection<out Any>` for maximum reuse

    • -0
    • +21
    ./gradle/kotlin/dsl/NamedDomainObjectCollectionExtensions.kt
    • -11
    • +0
    ./gradle/kotlin/dsl/NamedDomainObjectContainerExtensions.kt
Provide typed getting by delegate on NamedDomainObjectContainer

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

    • -6
    • +6
    ./gradle/kotlin/dsl/NamedDomainObjectContainerExtensions.kt
  1. … 1 more file in changeset.
Throw IllegalArgumentException instead of IllegalStateException

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

    • -1
    • +1
    ./gradle/kotlin/dsl/support/Exceptions.kt
Reuse illegalElementType()

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

    • -2
    • +1
    ./gradle/kotlin/dsl/NamedDomainObjectCollectionExtensions.kt
Simplify splitting :provider into :provider-plugins further

by moving tasks back into :provider

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

    • -0
    • +1
    ./gradle/kotlin/dsl/accessors/CodeGenerator.kt
  1. … 3 more files in changeset.
Refine [Named|Polymorphic]DomainObject[Collection|Container] extensions

by making their whole API available with the invoke syntax

and adding reified getByName<T>(name) {} to NamedDomainObjectCollection

and adding reified maybeCreate<T>(name) to PolymorphicDomainObjectContainer

adding more coverage along the way

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

    • -0
    • +36
    ./gradle/kotlin/dsl/NamedDomainObjectCollectionExtensions.kt
    • -27
    • +20
    ./gradle/kotlin/dsl/NamedDomainObjectContainerExtensions.kt
    • -0
    • +16
    ./gradle/kotlin/dsl/PolymorphicDomainObjectContainerExtensions.kt
  1. … 2 more files in changeset.
Simplify splitting :provider into :provider-plugins

by letting :provider-plugins depend directly on :provider

and removing :provider-spi

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

    • -1
    • +1
    ./gradle/kotlin/dsl/KotlinSettingsScript.kt
    • -4
    • +0
    ./gradle/kotlin/dsl/accessors/CodeGenerator.kt
    • -0
    • +59
    ./gradle/kotlin/dsl/accessors/KotlinTypeStrings.kt
    • -0
    • +100
    ./gradle/kotlin/dsl/accessors/ProjectSchemaProvider.kt
  1. … 24 more files in changeset.
Deduplicate project.serviceOf<T>()

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

    • -1
    • +1
    ./gradle/kotlin/dsl/KotlinSettingsScript.kt
  1. … 4 more files in changeset.
Move embedded plugins to the Gradle Plugins classloader

by moving them to the :provider-plugins project

and adding 2 SPI interfaces in order to share code with :provider

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

    • -0
    • +1
    ./gradle/kotlin/dsl/accessors/CodeGenerator.kt
    • -0
    • +28
    ./gradle/kotlin/dsl/accessors/DefaultAccessorsProvider.kt
    • -0
    • +26
    ./gradle/kotlin/dsl/accessors/GradleUserHomeServices.kt
    • -88
    • +0
    ./gradle/kotlin/dsl/accessors/ProjectSchema.kt
  1. … 12 more files in changeset.
Refine wording

Let the script dependencies resolver report warnings/errors to IntelliJ

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

Refine KotlinBuildScriptDependenciesResolver

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

Polish `KotlinScriptBasePlugin.kt`

Compute buildscript block compilation classpath lazily

Introduce `unsafeLazy` to replace `lazy` wherever possible

And remove the unnecessary thread synchronization overhead.

    • -1
    • +3
    ./gradle/kotlin/dsl/GroovyInteroperability.kt
    • -3
    • +4
    ./gradle/kotlin/dsl/KotlinInitScript.kt
    • -3
    • +4
    ./gradle/kotlin/dsl/KotlinSettingsScript.kt
    • -0
    • +26
    ./gradle/kotlin/dsl/support/unsafeLazy.kt
Compute classpath of root scope last to improve cache locality

Avoid intermediate data structures when computing the classpath

Replace `computeIfAbsent` by `getOrPut`

For compatibility with Java 9 which doesn't support reentrancy.

Optimise compilation classpath computation

- By caching the complete compilation `ClassPath` per `ClassLoaderScope`

- And by caching each individual `ClassLoader` `ClassPath`

The caches are part of a build scoped service and so all

`ClassLoaderScope` and `ClassLoader` instances will be held until the

end of the build.

See #824

Port `ClasspathUtil.getClasspath` to Kotlin

To prepare for caching.

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.