repositories {
maven.url 'http://example.com/artifactory/libs-release'
maven.url 'http://example.com/artifactory/libs-snapshot'
}
和
repositories {
maven { url 'http://example.com/artifactory/libs-release' }
maven { url 'http://example.com/artifactory/libs-snapshot' }
}
都工作。
According to documentationMavenArtifactRepository
有财产url
。
什么是以下 - 在url
值或属性setter的调用方法调用:
maven.url 'http://example.com/artifactory/libs-release'
什么是以下(我猜它调用MavenArtifactRepository
构造函数):
maven { url 'http://example.com/artifactory/libs-release' }
可能与[使用赋值“=”和括号{}]相混淆(http://stackoverflow.com/questions/22759542/confused-with-the-use-of-assignment-and-brackets) –