Skip to content

Commit ce55e4b

Browse files
committed
Updated docs
1 parent 4e80e73 commit ce55e4b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/sketch-project-file.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ profiles:
3434
platform_index_url: <3RD_PARTY_PLATFORM_DEPENDENCY_URL>
3535
libraries:
3636
- <INDEX_LIB_NAME> (<INDEX_LIB_VERSION>)
37+
- dependency: <INDEX_LIB_NAME> (<INDEX_LIB_VERSION>)
3738
- dir: <LOCAL_LIB_PATH>
3839
port: <PORT_NAME>
3940
port_config:
@@ -56,8 +57,13 @@ otherwise below). The available fields are:
5657
information as `<PLATFORM>`, `<PLATFORM_VERSION>`, and `<3RD_PARTY_PLATFORM_URL>` respectively but for the core
5758
platform dependency of the main core platform. These fields are optional.
5859
- `libraries:` is a section where the required libraries to build the project are defined. This section is optional.
59-
- `<INDEX_LIB_NAME> (<INDEX_LIB_VERSION>)` represents a library from the Arduino Libraries Index, for example,
60-
`MyLib (1.0.0)`.
60+
- `<INDEX_LIB_NAME> (<INDEX_LIB_VERSION>)` represents a library from the Arduino Libraries Index that is a direct
61+
dependency of the sketch, for example, `MyLib (1.0.0)`.
62+
- `dependency: <INDEX_LIB_NAME> (<INDEX_LIB_VERSION>)` represents a library from the Arduino Libraries Index that is
63+
an "indirect dependency", for example, if `MyLib` requires `UtilLib`, this fact can be recorded in the profile with
64+
the following declaration `dependency: UtilLib (1.3.4)`. A dependency library is treated exactly the same as a
65+
non-dependency library during sketch compilation; the distinction is only useful on library management, when adding
66+
or removing libraries, to determine if a dependency can be removed when the parent library is removed as well.
6167
- `dir: <LOCAL_LIB_PATH>` represents a library installed in the filesystem and `<LOCAL_LIB_PATH>` is the path to the
6268
library. The path could be absolute or relative to the sketch folder. This option is available since Arduino CLI
6369
1.3.0.

0 commit comments

Comments
 (0)