gradle里面获取git log 最近一次的commit id
def gitCommitShortHash = 'git log -1 --pretty=%h'.execute([], project.rootDir).text.trim()
本文介绍了一种在Gradle项目中自动获取Git最近一次提交ID(short hash)的方法,通过执行shell命令并读取输出,实现了在构建过程中集成Git版本信息的功能。
gradle里面获取git log 最近一次的commit id
def gitCommitShortHash = 'git log -1 --pretty=%h'.execute([], project.rootDir).text.trim()
613
1707
1079

被折叠的 条评论
为什么被折叠?