Hi,

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
 }


When I try to install the message is

 ./gradlew installPlugin -PpluginId=testPlugin1
:installPlugin
No install task defined for plugin testPlugin1, nothing to do

BUILD SUCCESSFUL

Total time: 1.516 secs


My testPlugin1 build.gradle is very simple
task install {
        doLast {
                println 'install task for my plugin test1'
                exec{ commandLine 'echo', 'Bonjour' } // this could be what you 
want
        }
}

task uninstall {
        doLast {
                println 'un-install task for my plugin test1'
                exec{ commandLine 'echo', 'Au-revoir' } // this could be what 
you want
        }
}

task hello {
        doLast {
           println 'tutorialspoint'
        }
}



with the previous version of taskExistsInproject  it works

└─$ ./gradlew installPlugin -PpluginId=testPlugin1
:plugins:testPlugin1:install
install task for my plugin test1
Bonjour
:installPlugin
installed plugin testPlugin1

BUILD SUCCESSFUL

Total time: 3.134 secs

Reply via email to