-
ProblemImporting all modules is not working when doing, dependencies {
implementation 'com.github.vestrel00:contacts-android:0.2.0'
} However, it still works for 0.1.0. WTF? EDIT: The real issue is discovered starting here: #203 (comment) Panic modeSo, the 0.2.0 release in JitPack is showing ✅ for successful deployment. However, today I did a sanity check by attempting to pull it into a new project. The build fails with... Looking at the JitPack logs... It seems like it should have succeeded... This really sucks. I'll have to figure this out QUICKLY before people really try to download it and realize 0.2.0 will not be downloadable. |
Beta Was this translation helpful? Give feedback.
Replies: 15 comments 6 replies
-
First thing I'll try is to just rebuild the release tag in JitPack... |
Beta Was this translation helpful? Give feedback.
-
That didn't work lol. Same issue. Next, I'll try to debug this locally. Running; Notice the So, what caused this regression??? Taking a look at the changes; 0.1.10...0.2.0 The only things that could have affected this is the upgrade from AGP 7.0.3 -> 7.1.0 and/or Gradle wrapper 7.0.2 -> 7.2. I'll take a look at what happens if I revert these upgrades.. |
Beta Was this translation helpful? Give feedback.
-
Okay. Reverting those changes DID NOT fix the issue. WTF! I also checked out the 0.1.10 tag and the issue is there too even though it was not there before!!! So, something must have changed outside the project's configuration... But what... |
Beta Was this translation helpful? Give feedback.
-
The only other thing I can think of is the maven-publish plugin! It is currently declared as...
The version of the maven-publish plugin is NOT SPECIFIED!!! |
Beta Was this translation helpful? Give feedback.
-
I took another look at the JitPack docs on publishing libraries... It seems that they have changed it... https://developer.android.com/studio/publish-library/configure-pub-variants#single-pub-var This step was not there as far as I remember several months ago when I integrated JitPack... |
Beta Was this translation helpful? Give feedback.
-
Also, it seems like the publication code has changed too; https://developer.android.com/studio/publish-library/upload-library#create-pub This is different from what are currently doing... |
Beta Was this translation helpful? Give feedback.
-
I set our publish code as...
I omitted the groupId, artifactId, and version. I'm still getting unspecified but hopefully GitHub+JitPack will fill that in for me. I'll give it a try. |
Beta Was this translation helpful? Give feedback.
-
That did not work... This could be a JitPack issue where it is no longer filling out the groupId, artifactId, and version... |
Beta Was this translation helpful? Give feedback.
-
Okay... Maybe I'm getting the issue all wrong. I tried to reproduce the issue using the same configuration I have in a sample Jitpack project I created several months ago, https://github.com/vestrel00/jitpack-publish-sample, but I'm not able to... I don't think that I'll be able to debug this issue locally. I will need to retry reverting the upgrade from AGP 7.0.3 -> 7.1.0 and/or Gradle wrapper 7.0.2 -> 7.2 and run it in JitPack. |
Beta Was this translation helpful? Give feedback.
-
So, the real issue is in the way the dependencies are declared in the consumer Gradle file. The following works perfectly...
BUT the following does not work...
However, it does work for the previous release...
|
Beta Was this translation helpful? Give feedback.
-
Downgrading AGP from 7.1.0 -> 7.0.3 and the Gradle wrapper 7.2 -> 7.0.2 does NOT fix the issue. |
Beta Was this translation helpful? Give feedback.
-
This might be similar to #179 This might just be an issue with JitPack? Hopefully, the issue will just magically go away... For now, I'll just update the README installation instructions to instruct consumers to NOT do I made this a discussion and set the title to "Installing all dependencies using |
Beta Was this translation helpful? Give feedback.
-
The only thing I can think of now is perhaps this issue only occurs if the library reaches a certain number of modules. In the previous release (0.1.10), there were only 8 modules. Now in 0.2.0 there are 11 modules. This is something worth exploring. It's a quick check. I can just delete the new custom data modules introduced in the new release one by one until it hopefully starts working again. If my theory is correct, I should use the official sample JitPack project to reproduce the issue https://github.com/jitpack/android-example/ |
Beta Was this translation helpful? Give feedback.
-
Maybe, the issue only occurs on certain consumer configurations because something might have changed with the publish outputs. I'll look into this. |
Beta Was this translation helpful? Give feedback.
-
Okay. I finally figure it out! The issue is not present if our library users use the new dependency resolution management; https://developer.android.com/studio/build/dependencies#remote-repositories This is where the Jitpack repository needs to be added. Inside dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
...
maven { url "https://jitpack.io" }
}
} This only applies to releases starting with 0.2.0. Prior releases can still be imported using the old way in the root allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
} I wonder if this entire situation must have been due to an update in JitPack or is it really because I updated the library project's AGP to 7.1.0? Whatever, it doesn't matter now. I wasted enough time on this already. |
Beta Was this translation helpful? Give feedback.
Okay. I finally figure it out!
The issue is not present if our library users use the new dependency resolution management; https://developer.android.com/studio/build/dependencies#remote-repositories
This is where the Jitpack repository needs to be added. Inside
settings.gradle
, it should look like,This only applies to releases starting with 0.2.0. Prior releases can still be imported using the old way in the root
build.gradle
,