Common dependencies to multiple environments

Hi,

is there a way to declare lib_deps common to multiple environments?
something like this:

[common]
; required for all the envs
lib_deps =
  ArduinoJson@6.16.1

[env:mkrwifi1010]
platform = atmelsam
board = mkrwifi1010
framework = arduino
lib_deps =
  WiFiNINA@1.7.0

[env:mkrgsm1400]
platform = atmelsam
board = mkrgsm1400
framework = arduino
lib_deps =

Thanks

The platformio.ini documentation front page (“platformio.ini” (Project Configuration File) — PlatformIO latest documentation) shows that as example, using access to other environment’s lib_deps value.

[common]
; required for all the envs
lib_deps =
  ArduinoJson@6.16.1

[env:mkrwifi1010]
platform = atmelsam
board = mkrwifi1010
framework = arduino
; include common deps plus specific deps
lib_deps =
  ${common.lib_deps}
  WiFiNINA@1.7.0

[env:mkrgsm1400]
platform = atmelsam
board = mkrgsm1400
framework = arduino
lib_deps =
  ${common.lib_deps}
2 Likes

Thanks @maxgerhardt,

I had seen that page, but I didn’t understand it in that way.

It works like a charm

1 Like