Mat*_*hbl 8 android github gradle maven android-studio
有没有人知道是否有可能使用github repo作为依赖关系,而不会将其发布到maven central.
假设我正在开发一个拥有它自己的github repo的android库.我希望能够在我的android工作室项目中"编译"这个库具有gradle依赖性,而不必发布到maven central(至少暂时).
换句话说:我想使用不在maven central上的依赖项.这是一个直接的github repo(一个也使用gradle的android库).
我想我的build.gradle做这样的事情:
dependencies {
// Google Play Services (normal dependency)
compile "com.google.android.gms:play-services:5.2.08"
// The library I want to pull from github
compile "path_to_my_github_repo"
}
Run Code Online (Sandbox Code Playgroud)
谢谢!
你可以做到这一点与Jitpack与Maven,摇篮和SBT.
但是,我强烈建议使用二进制工件,以便保证在应用程序的每次构建时它都是相同的,您可以控制工件存储,并且您正在使用项目的正式版本而不是某些下游构建.它还可以使您的构建更快,更稳定.
发布到中央存储库是免费的,简单且有详细记录,例如http://central.sonatype.org/pages/producers.html,特别是Gradle的http://central.sonatype.org/pages/gradle.html.您还可以在Nexus社区网站上找到许多真实世界的示例.
如果您不控制您想要使用的项目,我建议将这些指针发送到项目,甚至可以通过拉取请求帮助他们;-)
| 归档时间: |
|
| 查看次数: |
1623 次 |
| 最近记录: |