LicenseToolsPlugin icon indicating copy to clipboard operation
LicenseToolsPlugin copied to clipboard

updateLicenses always overwrites properties such as manually written copyrightHolder

Open hmiyado opened this issue 2 years ago • 2 comments

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?

  • Getting licenses that is from newly added libraries
  • Leaving properties as manually written

hmiyado avatar Sep 06 '21 06:09 hmiyado

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

chillinski avatar Dec 15 '21 06:12 chillinski

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.

hmiyado avatar Dec 18 '21 06:12 hmiyado