Currently, kotlin-csv-jvm is used on a single line of code for a relatively simple use case: reading and parsing a simple CSV file.
|
csvReader() |
|
.readAllWithHeader(releaseNotesFile) |
|
.map { row -> |
|
val version = row.values.first() |
|
val releaseNotes = row |
|
.entries |
|
.filterIndexed { index, _ -> index != 0 } |
|
.map { languageToReleaseNote -> |
|
LocalizedText().apply { |
|
language = languageToReleaseNote.key |
|
text = languageToReleaseNote.value |
|
} |
|
} |
|
log("Found release notes for version $version with languages: ${releaseNotes.map { it.language }}") |
|
Pair(version, releaseNotes) |
With a use case as simple as this one, using an entire CSV library seems a bit overkill with the downside of adding an external dependency to the project (which comes with the usual downsides of 3rd party dependencies).
I propose we remove the kotlin-csv-jvm dependency entirely and implement the currently required functionality ourselves.
Any thoughts or counter arguments on the topic, @chippmann ?
Currently, kotlin-csv-jvm is used on a single line of code for a relatively simple use case: reading and parsing a simple CSV file.
androidpublisher/src/main/kotlin/ch/hippmann/androidpublisher/publisher/PlayStore.kt
Lines 144 to 158 in a543d36
With a use case as simple as this one, using an entire CSV library seems a bit overkill with the downside of adding an external dependency to the project (which comes with the usual downsides of 3rd party dependencies).
I propose we remove the kotlin-csv-jvm dependency entirely and implement the currently required functionality ourselves.
Any thoughts or counter arguments on the topic, @chippmann ?