1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Libraries bundled with cores will take the type of that core, instead of relying on an undocumented 'types' property. Fixes #2875

This commit is contained in:
Federico Fissore
2015-05-19 12:24:11 +02:00
parent 65e0d8b547
commit 42b07f0337
14 changed files with 84 additions and 22 deletions

View File

@ -630,7 +630,7 @@ public class BaseNoGui {
loadContributedHardware(indexer);
createToolPreferences(indexer);
librariesIndexer = new LibrariesIndexer(BaseNoGui.getSettingsFolder());
librariesIndexer = new LibrariesIndexer(BaseNoGui.getSettingsFolder(), indexer);
File librariesIndexFile = librariesIndexer.getIndexFile();
if (!librariesIndexFile.isFile()) {
File defaultLibraryJsonFile = new File(getContentFile("dist"), "library_index.json");

View File

@ -56,13 +56,13 @@ public class UserLibrary extends ContributedLibrary {
private List<String> declaredTypes;
private static final List<String> MANDATORY_PROPERTIES = Arrays
.asList(new String[]{"name", "version", "author", "maintainer",
"sentence", "paragraph", "url"});
.asList("name", "version", "author", "maintainer",
"sentence", "paragraph", "url");
private static final List<String> CATEGORIES = Arrays.asList(new String[]{
"Display", "Communication", "Signal Input/Output", "Sensors",
"Device Control", "Timing", "Data Storage", "Data Processing", "Other",
"Uncategorized"});
private static final List<String> CATEGORIES = Arrays.asList(
"Display", "Communication", "Signal Input/Output", "Sensors",
"Device Control", "Timing", "Data Storage", "Data Processing", "Other",
"Uncategorized");
public static UserLibrary create(File libFolder) throws IOException {
// Parse metadata