[Question] copyrightHolder is always output to yaml as #COPYRIGHT HOLDER #
hatt0519 opened this issue · 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.
Is it impossible to get copyrightHolder automatically?
Unfortunately Yes. 😿
And then is useless
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)
}
}
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)