Open
Description
Describe the request
🙂 It will be easier for sketch developers to share a sketch as a package that includes library dependencies, avoiding the need for each user to install the library dependencies.
🙂 Library dependencies of the sketch can be controlled, allowing them to be pinned to the specific versions the sketch was intended to be used with, independent from the version of any globally installations of the library. As an example there are major changes to the API of the very popular "ArduinoJson" library in version 6 and sketches only work with one or the other major version series of that dependency.
Describe the current behavior
The common approach to bundling libraries with a sketch is to dump the library code files into the sketch root folder.
Arduino CLI version
Operating system
All
Operating system version
All
Additional context
- As a workaround in the preferences the sketchbook location (
directories.user
) can be set to the sketch folder. But this has to be done manually and changed every time another program is handled. So there could be some option for this to be set in the.ino
file. - In the build folder a file
build.options.json
is generated automatically.
There are some options where additional library folders could possibly be added?
E.g.:- builtInLibrariesFolders
- otherLibrariesFolders
Additional Requests
- Add advanced mode from Pro IDE arduino-ide#150 (comment)
- Support bundling libraries with a sketch #1255 (comment)
- Support bundling libraries with a sketch #1255 (comment)
- Support bundling libraries with a sketch #1255 (comment)
- Support bundling libraries with a sketch #1255 (comment)
- Support bundling libraries with a sketch #1255 (comment)
- Support bundling libraries with a sketch #1255 (comment)
- Detect libraries in Sketch Folder #2763
- local dependencies and libraries? #2818
- https://forum.arduino.cc/t/how-do-i-include-a-library-in-a-sketch-directory/1079812
- https://forum.arduino.cc/t/arduino-ide-cant-find-local-custom-libraries-in-relative-path/669421
- https://forum.arduino.cc/t/suggestion-improve-library-manager/847666
- https://forum.arduino.cc/t/using-generated-headers/912691
- https://forum.arduino.cc/t/arduino-library-question/1349706
- https://forum.arduino.cc/t/compiling-a-complex-project/1365325
Related
- https://forum.arduino.cc/t/local-libraries/1259854/1
- https://forum.arduino.cc/t/local-libraries/1259854/7
Issue checklist
- I searched for previous requests in the issue tracker
- I verified the feature was still missing when using the latest nightly build
- My request contains all necessary details