Open pavolloffay opened 7 years ago
Not out of the box, you would need to load the git history and filter it per file.
2017-06-20 11:23 GMT+02:00 Pavol Loffay notifications@github.com:
Hello,
is there a way to set a year in a header based on Git date?
e.g. File created this year: 2017 File created in 2016 and touched this year 2016-2017
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hierynomus/license-gradle-plugin/issues/140, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHLo71WEDY_xjku8ZKHV8uiuO5ul2hDks5sF4-IgaJpZM4N_T0v .
Do you have a code snippet for it? I think this is the mostly used in maven based license checks.
You could extend the license-gradle-plugin with the license-maven-plugin-git since the gradle plugin is based on the mvn one.
I come here from @aalmiray's Kordamp Licensing Plugin, which applies this plugin.
I'm also looking for "wiser" copyright year ranges, which would reflect file creation time and last modification time. Having fixed ${inceptionYear}-${currentYear}
doesn't feel good.
Note that it's how OpenJDK does it:
2018
: file created in 2018, and not modified in 2019 (example)2014-2019
: file created in 2014 and last modified in 2019 (example)2019
: file created in 2019 (example)@hierynomus, any chances you would provide such functionality? 🙂
Hello,
is there a way to set a year in a header based on Git date?
e.g. File created this year:
2017
File created in 2016 and touched this year2016-2017