0

I'm using jitpack to in my gradle as follows:

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

And in my github repo I have a sub-module called authentication

I need to use only this module in my project, so I added this to my module's build.gradle as mentioned here:

compile 'com.github.MotassemJa.MoAuth:authentication:0.0.5'

But I keep getting

Error:(23, 13) Failed to resolve: com.github.MotassemJa.MoAuth:authentication:0.0.5
Motassem Jalal
  • 1,254
  • 1
  • 22
  • 46

1 Answers1

3

As you can see at https://jitpack.io/com/github/MotassemJa/MoAuth/0.0.5/build.log, 0.0.5 was built from commit ebb529c949bf7d40815c815d051d45407e8f7f71 which is 0.0.5~2 and there the module was named moauth2.0.

It seems you moved the tag and thus the release after it was compiled and cached by JitPack.

It is always a very bad idea to modify releases after they are done instead of releasing a new version.

I don't know whether you can make JitPack forget the cache and rebuild your application, but maybe it would be best to move the 0.0.5 release back to where it was and create a 0.0.6 release.

You might be able to make JitPack re-build your app if you log into jitpack.io with GitHub and delete the existing build. The FAQ are not too clear on that. It could be that this only works for failed builds.

Vampire
  • 35,631
  • 4
  • 76
  • 102
  • I tried with a new release 0.0.6 from the latest commit and still face the same problem @Vampire – Motassem Jalal Jun 19 '17 at 13:57
  • I guess now it is because there **is** only one module. If you look at the example build https://jitpack.io/com/github/jitpack/gradle-modular/1.2/build.log you see two artifacts found, two artifacts published, and at your build https://jitpack.io/com/github/MotassemJa/MoAuth/0.0.6/build.log one artifact found, only parent artifact is built. – Vampire Jun 19 '17 at 14:03
  • Now it makes sense :) Thank you – Motassem Jalal Jun 19 '17 at 14:05
  • Do you know how I can upload them on as two modules? I created and example app module in my project and pushed it but jitpack is still deploying only one artifact – Motassem Jalal Jun 30 '17 at 15:05
  • What is "them"? If you have multiple modules in your build, JitPack makes them available individually as you can see at https://jitpack.io/com/github/jitpack/gradle-modular/1.2/build.log – Vampire Jun 30 '17 at 15:16