jitpack.io icon indicating copy to clipboard operation
jitpack.io copied to clipboard

serve aar from github release

Open farfromrefug opened this issue 1 year ago • 7 comments

I have a project for which the build is really complicated and long. Also the resulting aar is around 20Mb. So committing the release aar is not a good choice, and jitpack.io wont build the repo.

Is (could) there a way to tell jipack.io to "serve" a aar from a github release?

If not i think it would be a great addition. It would also reduce global storage usage as releases are already stored on github.

farfromrefug avatar Dec 16 '24 13:12 farfromrefug

I have a similar case where I must publish the already pre-built ARR. To do this, I created a separate repository where I keep the already pre-built AAR, and publish config looks like this:

publishing {
    publications {
        create<MavenPublication>("release") {
            groupId = "my_groupId"
            artifactId = "my_artifactId"
            version = "my_version"

            artifact(file("libs/my_lib.aar"))
        }
    }
}

sokolyaka avatar Dec 30 '24 12:12 sokolyaka

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jan 30 '25 01:01 github-actions[bot]

I bump.this so it remains open. Could we have an answer from the team ?

farfromrefug avatar Jan 30 '25 06:01 farfromrefug

JitPack supports custom build commands in jitpack.yml so there are many ways to publish an existing jar/aar.

Your install command could be a custom script that downloads the aar/pom and copies them to the local maven repository. Something like this could help https://gist.github.com/jitpack-io/f928a858aa5da08ad9d9662f982da983

jitpack-io avatar Jan 30 '25 12:01 jitpack-io

@jitpack-io thanks that looks like a good solution! I tried to set it up in my project https://github.com/Akylas/mobile-sdk/blob/master/%20jitpack.yml%20. But now i am facing the issue that jitpack log report that clone took longer than 180s. It is kind of a big project with a lot of submodules. Is there any way to fix that? Are you using shallow clone?

farfromrefug avatar Jan 30 '25 13:01 farfromrefug

For large repositories we generally recommend splitting them up into multiple libraries. Each can be built and hosted on JitPack. At the moment we don't support shallow cloning.

jitpack-io avatar Jan 30 '25 16:01 jitpack-io

I can't split the repo. I gues s for now I can't use jitpack.thanks

farfromrefug avatar Jan 30 '25 17:01 farfromrefug