Download Latest Version 1.1.3.zip (2.9 MB)
Email in envelope

Get an email when there's a new version of Gradle Kotlin DSL Samples

Home / v1.1.1
Name Modified Size InfoDownloads / Week
Parent folder
1.1.1.tar.gz 2019-01-08 2.4 MB
1.1.1.zip 2019-01-08 2.9 MB
README.md 2019-01-08 2.2 kB
Totals: 3 Items   5.2 MB 0

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:

    ```kotlin 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.

Source: README.md, updated 2019-01-08