JitPack won't use a GitHub repo - included sample repo that demonstrates the issue

天涯浪子 提交于 2019-12-05 16:26:44

I think the problem is the group and version.

In the build log you can see that in the Gradle call there is contained -Pgroup=com.github.ArthurHub and -Pversion=2.4.5. But also in the log you see Found artifact: com.theartofdev.edmodo:android-image-cropper:2.4.5-SNAPSHOT where it actually should be Found artifact: com.github.ArthurHub:android-image-cropper:2.4.5.

You also see in the list of files in the bottom of the log that only the POM is produced, no jar or aar. That's also why the Gradle sync is successful in AS, as the dependencies pom is found and valid, there is just no artifact for that dependency.

If you look at the build.gradle of the project you are referring, you can see that they do not use group and version for configution the publication, so what JitPack has set is not used and thus cannot be found.

That project simply is not JitPack compatible as long as JitPack does not get more intelligent and instead of just setting some project variables adds some init script that reconfigures publications or something like that.

Maybe you should use a composite build instead. With a composite build you would declare a binary dependency like com.theartofdev.edmodo:android-image-cropper:2.4.5, but then substitue this dependency by the worktree of the project and a sub-build is automatically done to get the artifact for the dependency. That's the pure Gradle way to replace a dependency with a custom build one.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!