我在 gradle 中使用 maven-publish 插件成功地向 maven Central 发布了一个简单的项目。
你可以在这里看到包。
您可以在github上找到我已发布项目的代码。
但是当我试图从新的 gradle 项目中实现它时,总是失败。
Could not resolve io.github.0123456hahaha0123456:example:1.0.2.
我不知道我错在哪里。请帮忙检查一下。谢谢
更新:
使用maven下载
<dependency>
<groupId>io.github.0123456hahaha0123456</groupId>
<artifactId>example</artifactId>
<version>1.0.2</version>
</dependency>
下载使用 gradle groovy
apply plugin 'groovy'
dependencies {
implementation "io.github.0123456hahaha0123456:example:1.0.2"
}