Issue
I am trying to convert Gradle's Groovy DSL
to Kotlin DSL
Gradle Groovy Code is :
repositories {
maven {
url "https://repo.tools.telstra.com/repository/maven-public"
}
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
I am trying this to convert into Kotlin DSL
, like below:
repositories {
maven { url = ("https://repo.tools.telstra.com/repository/maven-public") }
mavenCentral()
maven { url = ('https://plugins.gradle.org/m2/') }
}
With that I am getting error as:
Type mismatch: inferred type is String but URI! was expected
How can I setup URI here?
Solution
At the moment I am using Gradle 6.9, there we have to write it like below:
repositories {
maven(url = uri("https://repo.tools.telstra.com/repository/maven-public"))
mavenCentral()
maven( url = uri("https://plugins.gradle.org/m2/"))
}
Answered By - Pramod S. Nikam
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.