Hi guys!
I have set up a GitHub repository with various libraries in subfolders from where I am trying to install them in different projects. I have seen this example but cannot emulate it. I only get that the **pio lib install** ...
command to work when each library is in a separate repository. What would be the correct command to install them in the global storage if the libraries are located in subfolders but share the repository? Thank you!
P.S. I already implemented a solution with a pre-script similar to this one that works, but that is not what Iām looking for.
I think the magic is in the library.json
fileā¦ if you look at this one for instance, the git url at line 9 is for the repostiry, but itās the include line directive that maks it so only that particular libraries directory isā¦ wellā¦ included?
Even then, Iām not entirely sure how youād then install itā¦
Iāll fork that repo into my account so that the only difference is the username to check if it works. Itās interesting that this case is mentioned at the bottom of the āCreating Libraryā guide as āMultiple libraries in the one repositoryā.
Within that same guide, there is this phrase:
āYou can hold a lot of libraries (split into separated folders) inside one of the repository/archive. In this case, you need to specify include option of export field to relative path to your libraryās source codeā.
I think that It has to work somehow unless It was fixed by hand in the PlatformIO Library Registry.
So far, no way! I donāt understand how that example works
Any help is very much appreciated ā¦
Hmā¦ it seems like the magic sauce is the PlatformIO library crawlerā¦ when you read what the include parameter does, this all seems to be geared towards telling the crawler about the library format, and it will work it out, and then youād access the library via the platformio library registry, rather than directly from the github.
Itās looking like the extra_script I did before may be the only way to do it stand-aloneā¦ unless you āmisuseā branches to have a branch for each library!
Thank you for helping me reasoning this out! You read my mind, yesterday I was thinking of creating a git branch for each library, but I discarded it soon, Itād be a maintenance nightmare.
Iām afraid Iāll give up and think about a naming convention for a (future) long list of libraries on my account, each on its repository. I wanted to have just one ālibrary repoā with a folder naming convention, instead but ā¦ thatās the way life is ĀÆ_(ć)_/ĀÆ