Search code examples
androidgradle-kotlin-dsl

Adding maven { url "https://jitpack.io" }


How can I add maven { url "https://jitpack.io" } in settings.gradle.kts??

a red line appears under the url, the error says: Unexpected tokens (use ';' to separate expressions on the same line)

How can I solve this, please?

enter image description here


Solution

  • As of Android Koala, the format should be like this

    dependencyResolutionManagement {
        repositories {
            maven {
                url = uri("https://jitpack.io")
            }
        }
    }