File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
arduino-core/src/cc/arduino/cli Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 4848import cc .arduino .cli .commands .Common .Instance ;
4949import cc .arduino .cli .commands .Compile .CompileReq ;
5050import cc .arduino .cli .commands .Compile .CompileResp ;
51+ import cc .arduino .cli .commands .Lib .InstalledLibrary ;
52+ import cc .arduino .cli .commands .Lib .LibraryListReq ;
53+ import cc .arduino .cli .commands .Lib .LibraryListResp ;
5154import cc .arduino .cli .commands .Lib .LibrarySearchReq ;
5255import cc .arduino .cli .commands .Lib .LibrarySearchResp ;
5356import cc .arduino .cli .commands .Lib .SearchedLibrary ;
@@ -152,6 +155,18 @@ public List<SearchedLibrary> searchLibrary(String query)
152155 }
153156 }
154157
158+ public List <InstalledLibrary > libraryList (boolean listAll ) throws StatusException {
159+ try {
160+ LibraryListResp resp = stub .libraryList (LibraryListReq .newBuilder () //
161+ .setInstance (instance ) //
162+ .setAll (listAll ) //
163+ .build ());
164+ return resp .getInstalledLibraryList ();
165+ } catch (StatusRuntimeException e ) {
166+ throw e .getStatus ().asException ();
167+ }
168+ }
169+
155170 public List <ContributedLibraryRelease > libraryResolveDependecies (ContributedLibraryRelease lib ) {
156171 return new ArrayList <>();
157172 }
You can’t perform that action at this time.
0 commit comments