Whats the equivalent of the following code snippet from a build.gradle
in a build.gradle.kts
version?
repositories {
mavenCentral()
maven {
url '<MAVEN REPO URL>'
}
}
Whats the equivalent of the following code snippet from a build.gradle
in a build.gradle.kts
version?
repositories {
mavenCentral()
maven {
url '<MAVEN REPO URL>'
}
}
作为对其他答案的补充,在#kotlin-dsl/256中,快捷方式方法被添加到各种存储库方法中,以执行类似以下操作:
repositories {
mavenCentral()
maven(url = "<MAVEN REPO URL>")
}
根据问题,这是在Kotlin DSL 0.11.1
版中添加的.0.11.x
个版本包括在Gradle 4.2 release个版本中.
要查看您在使用Gradle wrapperRun ./gradlew --version
时与您的构建一起运行的Gradle版本,请运行./gradlew --version
.