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

Extension methods for getting current commit hash and timestamp #3

Open
lukebemish opened this issue Oct 10, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@lukebemish
Copy link
Contributor

lukebemish commented Oct 10, 2023

See https://discord.com/channels/313125603924639766/1136320550168436798/1161044932186865684. Several NeoForged projects, including Access transformers, include the build time as a timestamp in the built manifest. This isn't great. A better solution would be to include the timestamp and hash of the current commit - and having a method in the gradleutils extension for that is probably a good idea

@PaintNinja
Copy link

Helpful resource for writing extension methods with good IDE support: https://blog.mrhaki.com/2013/01/groovy-goodness-adding-extra-methods.html
A bit dated as you need to put it in META-INF\groovy instead of META-INF\services now but otherwise good.

@lukebemish
Copy link
Contributor Author

Helpful resource for writing extension methods with good IDE support: https://blog.mrhaki.com/2013/01/groovy-goodness-adding-extra-methods.html
A bit dated as you need to put it in META-INF\groovy instead of META-INF\services now but otherwise good.

Pretty sure groovy extension methods don't work with gradle, and certainly aren't usable by any of the other JVM languages that interact with gradle stuff. With that said - there's already a gradleutils project extension with lots of other stuff like thid, so I'd add it to that

@sciwhiz12 sciwhiz12 added the enhancement New feature or request label Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants