cookpad / LicenseToolsPlugin

Gradle plugin to check library licenses and generate license pages for Android
Apache License 2.0
175 stars 30 forks source link

updateLicenses always overwrites properties such as manually written copyrightHolder #144

Open hmiyado opened 3 years ago

hmiyado commented 3 years ago

Some properties like copyrightHolder cannot be get automatically (#23) so that I manually write them. However, ./gradlew updateLicenses always overwrite them as empty or #COPYRIGHT_HOLDER#. This command is useful to get licenses that is from newly added libraries.

Is there any way to satisfy two needs?

chillinski commented 2 years ago

I struggle with a similar use case in order to have a fully populated licenses.yml. We decided to use ./gradlew updateLicenses only once when we create a new project or add license checks for the first time to an existing repository. In the next step we use ./gradlew checkLicenses after our build task to check whether new license information needs to be added. CheckLicenses lists the full entry as UpdateLicenses would write it, so you can copy it to the licenses.yml

hmiyado commented 2 years ago

Thanks for your advice. It would be best that it is able to update license.yml directory. However, there seems to be no choice but to write license information manually from ./gradlew checkLicenses now.