目 录CONTENT

文章目录

Bug问题解决generateGitProperties git submodule Build FAILED

ByteNews
2023-02-26 / 0 评论 / 1 点赞 / 5,815 阅读 / 1,350 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2024-12-26,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

Bug问题解决Error while evaluating property 'generatedProperties' of task ':application:generateGitProperties'

  • Gradle框架的项目运行失败

:generateGitProperties git submodule Build FAILED in Halo

Error while evaluating property 'generatedProperties' of task ':generateGitProperties'
> No .git directory found!
Exception
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':generateGitProperties'.	
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)	
•••
Caused by: org.gradle.api.internal.tasks.properties.PropertyEvaluationException: Error while evaluating property 'generatedProperties' of task ':generateGitProperties'	
at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:33)	
•••
Caused by: java.lang.IllegalStateException: No .git directory found!	
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	
•••
at com.gorylenko.GitProperties.generate(GitProperties.groovy:68)	
•••
at com.gorylenko.GenerateGitPropertiesTask.getGeneratedProperties(GenerateGitPropertiesTask.groovy:75)	

这个Bug 是由插件 “com.gorylenko.gradle-git-properties” 引起的,去掉就好了

解决方案

把build.gradle文件的com.gorylenko.gradle-git-properties依赖去掉就可以了

id 'com.gorylenko.gradle-git-properties' version '2.0.0'

参考文档

https://stackoverflow.com/questions/63049665/generategitproperties-git-submodule-build-failed-in-heroku

1

评论区