Re: Plugin install process pb
Hello Taher, Taher Alkhateeb writes: > I've committed your work, thank you for the fix. For future cases, I > recommend to issue a JIRA with the fix and place your attachment over > there. Things get lost in the ML without proper tracking in a > ticketing system. Sure, I will do that. Thanks for commiting the fix. -- Mathieu Lirzin GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Re: Plugin install process pb
Hi Mathieu, I've committed your work, thank you for the fix. For future cases, I recommend to issue a JIRA with the fix and place your attachment over there. Things get lost in the ML without proper tracking in a ticketing system. On Mon, Aug 13, 2018 at 7:25 PM Mathieu Lirzin wrote: > > Hello again, > > Mathieu Lirzin 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. > > > Thanks. > > -- > Mathieu Lirzin > GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Re: Plugin install process pb
It works, Thanks for your reactivity Le 13/08/2018 à 18:25, Mathieu Lirzin a écrit : > Hello again, > > Mathieu Lirzin 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. > > > > > Thanks. >
Re: Plugin install process pb
Thanks Olivier, Seems it's unrelated and Mathieu is working on it :) Jacques Le 13/08/2018 à 17:07, Olivier Heintz a écrit : I'm on a debian stretch, I'm just testing with a ubuntu 18.04 and Oracle JDK and there is then same message No install task defined for plugin testPlugin1, nothing to do Le 13/08/2018 à 16:36, Jacques Le Roux a écrit : Hi Olivier, Did you try with an Oracle JDK? Also which Linux distribution/version are you using? Jacques Le 13/08/2018 à 16:28, Olivier Heintz a écrit : Yes, I confirm, with the old code it works ( I have found which commit after multiple test, each one for each commit on build.gradle ;-) ) Le 13/08/2018 à 14:12, Taher Alkhateeb a écrit : Hi Olivier, Can you confirm that if you test _before_ this commit that it works? If yes, then this commit needs to be reverted. On Mon, Aug 13, 2018 at 1:22 PM Olivier Heintz wrote: 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
Re: Plugin install process pb
Good news, thanks Mathieu Jacques Le 13/08/2018 à 18:02, Mathieu Lirzin a écrit : Hello, Just to let you know that I have been able to reproduce the bug, and I am working on fixing it. Olivier Heintz 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 } 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
Re: Plugin install process pb
Hello again, Mathieu Lirzin 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
Re: Plugin install process pb
Hello, Just to let you know that I have been able to reproduce the bug, and I am working on fixing it. Olivier Heintz 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 > } > > > 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 -- Mathieu Lirzin GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Re: Plugin install process pb
I'm on a debian stretch, I'm just testing with a ubuntu 18.04 and Oracle JDK and there is then same message No install task defined for plugin testPlugin1, nothing to do Le 13/08/2018 à 16:36, Jacques Le Roux a écrit : > Hi Olivier, > > Did you try with an Oracle JDK? Also which Linux distribution/version are you > using? > > Jacques > > > Le 13/08/2018 à 16:28, Olivier Heintz a écrit : >> Yes, I confirm, with the old code it works >> ( I have found which commit after multiple test, each one for each commit on >> build.gradle ;-) ) >> >> Le 13/08/2018 à 14:12, Taher Alkhateeb a écrit : >>> Hi Olivier, >>> >>> Can you confirm that if you test _before_ this commit that it works? >>> If yes, then this commit needs to be reverted. >>> On Mon, Aug 13, 2018 at 1:22 PM Olivier Heintz >>> wrote: 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 > >
Re: Plugin install process pb
I doubt the JDK has anything to do with this. Probably a syntax issue is the root cause. On Mon, Aug 13, 2018, 5:36 PM Jacques Le Roux wrote: > Hi Olivier, > > Did you try with an Oracle JDK? Also which Linux distribution/version are > you using? > > Jacques > > > Le 13/08/2018 à 16:28, Olivier Heintz a écrit : > > Yes, I confirm, with the old code it works > > ( I have found which commit after multiple test, each one for each > commit on build.gradle ;-) ) > > > > Le 13/08/2018 à 14:12, Taher Alkhateeb a écrit : > >> Hi Olivier, > >> > >> Can you confirm that if you test _before_ this commit that it works? > >> If yes, then this commit needs to be reverted. > >> On Mon, Aug 13, 2018 at 1:22 PM Olivier Heintz > >> wrote: > >>> 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 > >
Re: Plugin install process pb
Hi Olivier, Did you try with an Oracle JDK? Also which Linux distribution/version are you using? Jacques Le 13/08/2018 à 16:28, Olivier Heintz a écrit : Yes, I confirm, with the old code it works ( I have found which commit after multiple test, each one for each commit on build.gradle ;-) ) Le 13/08/2018 à 14:12, Taher Alkhateeb a écrit : Hi Olivier, Can you confirm that if you test _before_ this commit that it works? If yes, then this commit needs to be reverted. On Mon, Aug 13, 2018 at 1:22 PM Olivier Heintz wrote: 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
Re: Plugin install process pb
Yes, I confirm, with the old code it works ( I have found which commit after multiple test, each one for each commit on build.gradle ;-) ) Le 13/08/2018 à 14:12, Taher Alkhateeb a écrit : > Hi Olivier, > > Can you confirm that if you test _before_ this commit that it works? > If yes, then this commit needs to be reverted. > On Mon, Aug 13, 2018 at 1:22 PM Olivier Heintz > wrote: >> >> 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 >
Re: Plugin install process pb
Hi Olivier, Can you confirm that if you test _before_ this commit that it works? If yes, then this commit needs to be reverted. On Mon, Aug 13, 2018 at 1:22 PM Olivier Heintz wrote: > > 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
Plugin install process pb
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