Use of file based local maven repository during build

Hello

i am currently trying to improve our Android projects build time. Especially the ones running for each branch on our CI.
One of our main problems is our dependency to mupdf. We have it as part of our repo and can include it in our built - but it is very resistant to our caching :frowning:
One option to cache it would be to simply publish its artifact to a local file based maven repository defined as a file://path url (see Declaring repositories ) and cache this.

For a full-clean build we would have two steps then:

  1. Building the mupdf library and publishing it to the local repository

  2. Building the app which defines a local repo with something like:

    repositories {
      maven {
        name = 'local'
        url = "file://${rootProject.buildDir}/mvn-repo"
      }
    }

so we would still ship the whole source and build everything on the fdroid server.

but before i do these changes i wanted to check back with you if that is okay with you and if your linters would actually allow a repo definition like that?

I would be glad if you could help me out on this as i did not find any information to this specific approach within the doc or the forum.

Johannes

What if you put in in the proper place like: metadata/im.vector.app.yml 路 master 路 F-Droid / Data 路 GitLab ?

Grep .m2 for more examples in metadata/

HI Lican,
thanks for your suggestion. That would work too and i couldsimply use the mavenLocal() repository definition from gradle then.
I just scanned the repo and did a look at the firefox klar and the element client build files :+1:

I will use a similiar solution that makes use of mavenLocal from our repo.
Thank you for you help

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.