为了方便使用和管理自己平时积累的一些代码,故学习使用gradle插件发布自己的库到jcenter,网上已经有很多文章可供大家参考,推荐:https://www.jianshu.com/p/789827a19c0c
记录一下自己在发布过程中遇到的坑
1. Error:Execution failed for task ':commonUtils:bintrayUpload'.
Could not create package 'yunhui/maven/commonUtils': HTTP/1.1 404 Not Found [message:Repo 'maven' was not found]
这是由于下面图一中name位置的参数与图二中repo的参数不一致导致的,改为一直便可。
2. 如果上传的过程中出现
Could not upload to 'https://xxxxxxx.pom': HTTP/1.1 400 Bad Request [message:Unable to upload files: Maven group, artifact or version defined in the pom file do not match the file path 'xxxxxxx.pom']