Hello again,
Mathieu Lirzin <[email protected]> writes:
>> In my environment (Linux, openjdk version "1.8.0_171") plugin install
>> process does not work any more since this commit (june, 20)
>>
>> def taskExistsInproject(fullyQualifiedProject, taskName) {
>> - def taskExists = false
>> - subprojects.each { subProject ->
>> - if (subProject.getPath().equals(fullyQualifiedProject.toString())) {
>> - subProject.tasks.each { projTask ->
>> - if (taskName.equals(projTask.name)) {
>> - taskExists = true
>> - }
>> - }
>> - }
>> - }
>> - return taskExists
>> + subprojects.stream()
>> + .filter { it.path == fullyQualifiedProject.toString() }
>> + .flatMap { it.tasks.stream() }
>> + .anyMatch taskName.&equals
>> }
The problem is that ‘taskName’ is compares with a task instead of the
task ‘name’ property. Here is a patch that fixes the bug.
diff --git build.gradle build.gradle
index d326d10f3a..42eb3d5254 100644
--- build.gradle
+++ build.gradle
@@ -1037,7 +1037,7 @@ def taskExistsInproject(fullyQualifiedProject, taskName) {
subprojects.stream()
.filter { it.path == fullyQualifiedProject.toString() }
.flatMap { it.tasks.stream() }
- .anyMatch taskName.&equals
+ .anyMatch { it.name == taskName }
}
def gradlewSubprocess(commandList) {
Thanks.
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37