Commit bac6ce0
TheSnoozer
Avoid injecting a project in GitCommitIdPluginGenerationTask
A build with gradle 5.4.1 is failing with
```
* What went wrong:
A problem occurred evaluating root project 'git-commit-id-gradle-debugging.NiPqb7ARWM'.
> Failed to apply plugin [id 'io.github.git-commit-id.git-commit-id-gradle-plugin']
> Could not create task ':gitCommitIdGenerationTask'.
> No service of type Project available in ProjectScopeServices.
```
This is likely due to the fact that the GitCommitIdPluginGenerationTask is trying to inject a project.
However I believe this is not even needed.
Why?
The expectation is that lazy properties are only supported with gradle 5.1 so we can treat it as minimal supported version.
As per https://docs.gradle.org/5.1/javadoc/org/gradle/api/DefaultTask.html
the DefaultTask inherits a Task.
And as per
https://docs.gradle.org/5.1/javadoc/org/gradle/api/Task.html#getProject()
a task already has the ability to get the project.
Hence there should be no need to inject a project into a GitCommitIdPluginGenerationTask / DefaultTask / Task.1 parent a6f1cf9 commit bac6ce0
1 file changed
Lines changed: 0 additions & 13 deletions
Lines changed: 0 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 55 | | |
69 | 56 | | |
70 | 57 | | |
| |||
0 commit comments