I just upgraded from 5.2.1 to 6.0.1, using the Kot...
# gradle
c
I just upgraded from 5.2.1 to 6.0.1, using the Kotlin DSL and I had some code in my settings.gradle.kts that is now broken:
Copy code
rootProject.name = "example"

val mavenUser: String by settings
val mavenPassword: String by settings

pluginManagement {
  repositories {
    maven {
      url = uri("<https://myrepo>")
      authentication { create<BasicAuthentication>("basic") }
      credentials {
        username = mavenUser
        password = mavenPassword
      }
    }
  }
}
Specifically the
mavenUser
and password in the credentials block is now an ‘unresolved reference’
Any ideas on how I can change it to look up the username/password for my repo?
s
`settings.gradle.kts`is now evaluated before
buildSrc
.
c
Yeah. I figured it was some fundamental change like that. I need to look up credentials to authenticate against my internal repository for my plugins. How can I access properties from
-P
or
~/.gradle/gradle.properties
?