在Gradle中,要将身份验证信息传递到存储库定义以进行发布,请使用authentication
元素(来自类MavenRemoteRepository
)。这可能看起来像这样:
subprojects {
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'https://repo.cool.org/') {
authentication(userName: "public", password: "secret")
} } } } }
这可能是顶级的。但是,当它包含在subprojects
元素中(然后仅)时,IntelliJ会报告无法应用参数。似乎IntelliJ突然假设authentication
来自AuthenticationSupported
,而Gradle仍然找到了预期的元素。
这是IntelliJ中的错误吗?可以转换build.gradle
文件,使Gradle和IntelliJ都满意吗?或者我是否必须禁止警告?