I am trying out the 14 days trial of Jitpack.io
so that I can use my Android Libraries on gitlab through gradle
in my production apps.
So what I basically have: 2 Android apps on GitLab 2 Android Libraries on GitLab
I am currently importing them by (settings.gradle):
include ':app',':library'
project(':library').projectDir = new File(settingsDir, 'some_/long/path')
build.gradle:
implementation project(':library')
Which is obviously quite troublesome. So I did:
- I followed the 'setup' part on the original docs
- I followed the 'Gitlab' part on the original docs
I think everything was quite well setup because I saw my repositories at the homepage on the left hand side so I went to the private page to test out if I could get it to work. I also obviously did what was told in the private section.
So my files looked like this:
gradle.properties (nothing, basically that line):
authToken=my_super_secret_token_generated_by_gitlab
project build.gradle:
maven {
url "https://jitpack.io"
credentials { username authToken }
}
And then my build.gradle in my app:
implementation 'com.gitlab.organization:library:master'
But then I get a strange unauthorized error, I don't know why. My Access Token has API access and when I fill in the token in Jitpack it also shows a green checkmark. See my error below:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve com.gitlab.organization:library:master.
Required by:
project :app
> Could not resolve com.gitlab.organization:library:master.
> Could not get resource 'https://jitpack.io/com/gitlab/organization/library/master/library-master.pom'.
> Could not GET 'https://jitpack.io/com/gitlab/organization/library/master/library-master/libary-master.pom'. Received status code 401 from server: Unauthorized
Does someone has any idea why it is unauthorized? I got to say library
is in a subgroup, so I have tried many other ways to try to resolve it but It did not really help.