in build-tools/src/main/java/co/elastic/otel/android/compilation/tools/tasks/CreateNoticeTask.java [116:135]
private List<String> getLicenseIds() {
try {
List<String> licenseIds = new ArrayList<>();
File licensesFound = getFoundLicensesIds().get().getAsFile();
BufferedReader reader = new BufferedReader(new FileReader(licensesFound));
String line;
while ((line = reader.readLine()) != null) {
ArtifactLicense artifactLicense = ArtifactLicense.parse(line);
String licenseId = artifactLicense.licenseId;
if (!licenseIds.contains(licenseId)) {
licenseIds.add(licenseId);
}
}
reader.close();
licenseIds.sort(Comparator.comparing(it -> it));
return licenseIds;
} catch (IOException e) {
throw new RuntimeException(e);
}
}