Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

1.1.1

Compare
Choose a tag to compare
@eskatos eskatos released this 10 Jan 23:56
e57395d

Gradle Kotlin DSL 1.1.1 Release Notes

Gradle Kotlin DSL 1.1.1 fixes issues around type-safe accessors generation correctness and introduces a missing reified generic Kotlin extension to create MapProperty objects.

v1.1.1 is included in Gradle 5.1.1.

To use it, upgrade your Gradle wrapper in the following fashion:

$ cd $YOUR_PROJECT_ROOT
$ gradle wrapper --gradle-version 5.1.1 --distribution-type all

Updates since v1.1.0 (Gradle 5.1)

  • Add convenience method for MapProperty introduced in 5.1 (#1307)

    The new method makes working with map inputs a little more convenient:

    open class Generator : DefaultTask() {
    
        @Input
        val properties = project.objects.mapProperty<String, Int>()
    
        @TaskAction
        fun generate() {
            properties.get().forEach { (key, value) ->
                logger.quiet("$key = $value")
            }
        }
    }
  • Caching of type-safe model accessors didn't take differences in container elements into account (#1303, #1304)

    In order to speed up the compilation of Kotlin DSL build scripts and amortise the cost of the required code generation step, the Kotlin DSL script compiler tries to maximise the reuse of generated type-safe model accessors across projects and builds.

    It does that by caching the generated code based on a key defined by, among other things, the set of accessible Gradle model elements in the target project.

    In previous versions however, the cache key definition was missing elements from Gradle model containers such as tasks and sourceSets which would cause accessors generated for one project to be (wrongly) reused for another project when they differed only in the set of accessible container elements.

    This defect has been fixed.

For the complete list see the gradle/kotlin-dsl issues for 1.1.1.