Skip to content
This repository has been archived by the owner on Jan 17, 2020. It is now read-only.

Use escapedName to generate valid library YAML #116

Closed

Conversation

hopewm
Copy link

@hopewm hopewm commented Apr 9, 2019

Fix #100

When a library info entry is generated via the updateLicenses task, if the library's name contains a colon (:), the resulting output is invalidly-formatted YAML:

- artifact: com.squareup.retrofit2:adapter-rxjava2:+
  name: Adapter: RxJava 2

This invalid YAML prevents the licenses.yml file from being properly parsed by the checkLicenses, generateLicensePage, and generateLicenseJson tasks:

Execution failed for task ':example:checkLicenses'.
> mapping values are not allowed here
   in 'string', line 143, column 16:
        name: Adapter: RxJava 2

PR #59 introduced a function for handling library names with colons, but use of that function appears to have been unintentionally not carried over in PR #86.

This PR utilizes escapedName from #59 so that library names with colons are surrounded with quotes:

- artifact: com.squareup.retrofit2:adapter-rxjava2:+
  name: "Adapter: RxJava 2"

@k4zy
Copy link
Contributor

k4zy commented Jan 14, 2020

We are going to archive this repository.
Please migrate https://github.com/kazyApp/LicenseToolsPlugin
I will fix this problem https://github.com/kazyApp/LicenseToolsPlugin/issues/3

@k4zy k4zy closed this Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generated YAML-like format is incompatible with YAML
2 participants