LicenseToolsPlugin icon indicating copy to clipboard operation
LicenseToolsPlugin copied to clipboard

[Question] copyrightHolder is always output to yaml as #COPYRIGHT HOLDER #

Open n1nnin opened this issue 6 years ago • 4 comments

Hi. I think it's a great plugin.

When I run ./gradlew checkLicenses in my project, copyrightHolder always outputs with #COPYRIGHT HOLDER # .

After reading the code, https://github.com/cookpad/LicenseToolsPlugin/blob/master/plugin/src/main/java/com/cookpad/android/plugin/license/task/CheckLicenses.kt#L177-L185 I didn't seem to set a value in copyrightHolder.

Is it impossible to get copyrightHolder automatically?

I have reproduced this issue with v1.1.0.

n1nnin avatar Jan 22 '20 08:01 n1nnin

Is it impossible to get copyrightHolder automatically?

Unfortunately Yes. 😿

k4zy avatar Feb 12 '20 07:02 k4zy

And then is useless

PhantomLord72 avatar Sep 01 '20 11:09 PhantomLord72

I found the task "generateLicensePage" always fails due to no copyright holder. Templates#assertLicenseAndStatement checks whether LibraryInfo#getCopyrightStatement is null. In LibraryInfo, it returns null if copyrightHolder is null or empty <- this always happens now.

    fun getCopyrightStatement(): String? {
        return when {
            notice?.isNotBlank() ?: false -> notice
            copyrightHolder.isNullOrEmpty() -> null
            else -> buildCopyrightStatement(copyrightHolder)
        }
    }

AlanChiou avatar May 03 '21 05:05 AlanChiou

i agree that without the option to either auto-fill copyrightHolder, this plugin is useless, since it fails to generate when there is no copyrightHolder available.

so either fix the auto-fill, or fix the generation to simply skip the copyright notice (since this plugin is made for license notice, i don't see the need for copyright notice)

FreTimmerman avatar Jan 25 '22 10:01 FreTimmerman