79504277

Date: 2025-03-12 16:41:54
Score: 0.5
Natty:
Report link

So I found out that every guide I looked at, assumed that Gradle setup was done with Groovy (in settings.gradle), while I was using Kotlin (hence editing settings.gradle.kts), and did not realize this. To update the auth setup accordingly with the correct syntax for Kotlin:

dependencyResolutionManagement {
    repositories {
        maven(url = uri("URL HERE")) {
            credentials {
                username = "username"
                password = "" // private token here.
            }
            authentication.create<BasicAuthentication>("basic")
        }
    }
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: heisveis