mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-20 21:01:25 +03:00
Added "license" field in libraries.
This commit is contained in:
@ -22,6 +22,7 @@ public class Library {
|
|||||||
private String paragraph;
|
private String paragraph;
|
||||||
private String url;
|
private String url;
|
||||||
private String category;
|
private String category;
|
||||||
|
private String license;
|
||||||
private List<String> architectures;
|
private List<String> architectures;
|
||||||
private File folder;
|
private File folder;
|
||||||
private File srcFolder;
|
private File srcFolder;
|
||||||
@ -125,6 +126,10 @@ public class Library {
|
|||||||
if (!CATEGORIES.contains(category))
|
if (!CATEGORIES.contains(category))
|
||||||
category = "Uncategorized";
|
category = "Uncategorized";
|
||||||
|
|
||||||
|
String license = properties.get("license");
|
||||||
|
if (license == null)
|
||||||
|
license = "Unspecified";
|
||||||
|
|
||||||
Library res = new Library();
|
Library res = new Library();
|
||||||
res.folder = libFolder;
|
res.folder = libFolder;
|
||||||
res.srcFolder = srcFolder;
|
res.srcFolder = srcFolder;
|
||||||
@ -136,6 +141,7 @@ public class Library {
|
|||||||
res.paragraph = properties.get("paragraph").trim();
|
res.paragraph = properties.get("paragraph").trim();
|
||||||
res.url = properties.get("url").trim();
|
res.url = properties.get("url").trim();
|
||||||
res.category = category.trim();
|
res.category = category.trim();
|
||||||
|
res.license = license.trim();
|
||||||
res.architectures = archs;
|
res.architectures = archs;
|
||||||
res.useRecursion = useRecursion;
|
res.useRecursion = useRecursion;
|
||||||
res.isLegacy = false;
|
res.isLegacy = false;
|
||||||
@ -200,6 +206,10 @@ public class Library {
|
|||||||
return category;
|
return category;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getLicense() {
|
||||||
|
return license;
|
||||||
|
}
|
||||||
|
|
||||||
public static List<String> getCategories() {
|
public static List<String> getCategories() {
|
||||||
return CATEGORIES;
|
return CATEGORIES;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user