refreshVersions icon indicating copy to clipboard operation
refreshVersions copied to clipboard

Update refreshVersionsMigrate to work only within the dependencies blocks (and test with KMP projects, including with Kotlin DSL)

Open LouisCAD opened this issue 3 years ago • 4 comments

LouisCAD avatar Dec 19 '21 00:12 LouisCAD

Error happens when try to use on scope of protobuf too, as example:

protobuf {
  protoc {
    artifact = "com.google.protobuf:protoc:$google_protobuf_version" << //  libs.protoc
  }
  ...
}

Caused by: org.gradle.api.InvalidUserDataException: Name must not be null!

joaoeudes7 avatar Nov 18 '22 16:11 joaoeudes7

@joaoeudes7 Use versionFor("com.google.protobuf:protoc:_").

LouisCAD avatar Nov 24 '22 12:11 LouisCAD

@joaoeudes7 Use versionFor("com.google.protobuf:protoc:_").

Not works here, i got this error: Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method versionFor() for arguments [com.google.protobuf:protoc:_] on object of type com.google.protobuf.gradle.ExecutableLocator.

joaoeudes7 avatar Dec 27 '22 19:12 joaoeudes7

The following worked for me to have refreshVersions handle the protobuf compiler:

     protobuf {
         protoc {
            val version = versionFor("com.google.protobuf:protoc:_")
            artifact = "com.google.protobuf:protoc:$version"
         }
     }

danielcliffordmiller avatar Feb 24 '23 18:02 danielcliffordmiller