littlerobots / version-catalog-update-plugin

Gradle plugin for updating a project version catalog
Apache License 2.0
566 stars 23 forks source link

Error when setting sortByKey (Kotlin) #27

Closed jlee-everlaw closed 2 years ago

jlee-everlaw commented 2 years ago

Hello, this might be a newbie question, but I get the following error

* What went wrong:
Script compilation error:

  Line 7:     sortByKey.set(false)
                        ^ Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
                            public inline operator fun kotlin.text.StringBuilder /* = java.lang.StringBuilder */.set(index: Int, value: Char): Unit defined in kotlin.text

My build.gradle.kts looks like

plugins {
    alias(libs.plugins.gradleVersions)
    alias(libs.plugins.versionCatalogUpdater)
}

versionCatalogUpdate {
    sortByKey.set(false)
}

...
hvisser commented 2 years ago

Yes this has been fixed for the next version, but not yet released (see #26), in the meantime using sortByKey = false should work. I'll publish 0.3.1 soon.

hvisser commented 2 years ago

I've released version 0.3.1, it should be on Maven Central soon.