【发布时间】:2020-08-06 06:32:37
【问题描述】:
在我的 build.gradle 文件的顶部我放了这个:
buildscript
{
repositories
{
mavenLocal()
}
dependencies
{
classpath(group: 'com.telenav.tdk.core.gradle', name: 'tdk-core-gradle-plugin', version: '1.0')
}
}
下面我尝试应用插件,但这没关系,因为它没有在本地 maven 存储库中寻找正确的工件。我得到了这个错误:
* What went wrong:
Plugin [id: 'tdk-core-gradle-plugin', version: '1.0'] was not found in any of the following sources:
- Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/6.5.1/userguide/standard_plugins.html for available core plugins)
- Plugin Repositories (could not resolve plugin artifact 'tdk-core-gradle-plugin:tdk-core-gradle-plugin.gradle.plugin:1.0')
Searched in the following repositories:
Gradle Central Plugin Repository
我觉得这很奇怪,因为 (1) 它没有搜索我的本地 maven 存储库,并且 (2) 它从完全不同的工件描述符中查找:
'tdk-core-gradle-plugin:tdk-core-gradle-plugin.gradle.plugin:1.0
比我明确指定的那个:
com.telenav.tdk.core.gradle:tdk-core-gradle-plugin:1.0
这对我来说很违反直觉,但我确信有某种解释。 有人知道发生了什么吗?
谢谢,
Jon
【问题讨论】: