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'
评论区