Gradle add dependency from Gitlab private repository

Hello,

I followed the steps in this link Maven packages in the Package Repository | GitLab
I was able to create a jar file and push it, I also can see it in my project Package Registry.

When I try to add the dependency in another project just like the document says, gradle finds the package but doesn’t download the jar file. It downloads .pom file and .module file but never jar file and hence the project can’t see the library classes.

In my build.gradle I use:

repositories {
mavenCentral()

maven {
    url "https://gitlab.apptcom.com/api/v4/projects/37/packages/maven"
    credentials(HttpHeaderCredentials) {
        name = 'Private-Token'
        value = gitLabPrivateToken
    }
    authentication {
        header(HttpHeaderAuthentication)
    }
}

}

dependencies {
implementation ‘com.apptcom.kidstar:kidstar-library:0.0.10’
}

@hesham.abboud : did you find any solution around it ? i am facing same issue