Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Year based on Git #140

Open
pavolloffay opened this issue Jun 20, 2017 · 4 comments · May be fixed by #212
Open

Year based on Git #140

pavolloffay opened this issue Jun 20, 2017 · 4 comments · May be fixed by #212

Comments

@pavolloffay
Copy link

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

@hierynomus
Copy link
Owner

hierynomus commented Jun 20, 2017 via email

@pavolloffay
Copy link
Author

Do you have a code snippet for it? I think this is the mostly used in maven based license checks.

@RiRomain
Copy link

You could extend the license-gradle-plugin with the license-maven-plugin-git since the gradle plugin is based on the mvn one.

https://github.com/mycila/license-maven-plugin/tree/master/license-maven-plugin-git#how-to-use-license-maven-plugin-git

@tlinkowski
Copy link

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? 🙂

@uyw4687 uyw4687 linked a pull request Oct 1, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants