during experiments it occured that if I am implementing my own task which implements VerificationTask, it is not saying that launching my implemented task with --continue will work for some fails. I am saying that just for instance. In my case I will just implement a code in the way that it will be working by configuring a flag, and ignoring failures by default.
Thanks for your help, now seems I know how to solve my problem. =) But sadly it hasn`t worked so simply =)) Середа, 20 серпня 2014 р. 18:22:44 UTC+3 користувач Xavier Ducrohet написав: > > I think you can do this: > > - Create your own task type, make it implement > org.gradle.api.tasks.VerificationTask > - In that task, call your other Gradle projects, maybe through the tooling > API. > - In your task, check the result and the getIgnoreFailures() and only > throw if the result is failure and getIgnoreFailures() return false. > > I *think* that gradle will look for all task withType VerificationTask and > call setIgnoreFailures if --continue is passed. > > You may want to also pass --continue to your secondary build.gradle > project when you call it. > > > On Wed, Aug 20, 2014 at 7:16 AM, Andrii Bogachenko <[email protected] > <javascript:>> wrote: > >> Well I`ll now try to use your advise, and I didin`t know that --continue >> has influence only on test type tasks. >> But actually my gradle script is a little more complex. >> Each of my android projects are having two build.gradle files. I want to >> run each application twice, with differneces in number of tasks. >> That`s why I am using GradleBuild task types, because it is impossible to >> run a task twice during the gradle script execution. >> >> Maybe there is a way to make a try-catch block, as it is made in gradle`s >> test task? >> But then it is probably necessary to write a task in buildSrc foler and >> create something like my own plugin? >> >> >> Вівторок, 19 серпня 2014 р. 18:58:58 UTC+3 користувач Xavier Ducrohet >> написав: >>> >>> It looks like you are creating a task that is meant to run a separate >>> Gradle call, per subproject. so each project is called with --continue, but >>> the first call isn't. >>> >>> --continue is used very specifically by task of type Test so that they >>> do not throw an exception if a test fail in order to not stop the execution >>> of Gradle. The GradleBuild task likely doesn't do that. >>> >>> I would find a different solution. For instance create a simple empty >>> task, then figure out which projects you want to run (since it seems to be >>> dynamic), and simply make you empty task depend on the project task using >>> the "fully-qualified" task name (:mysubproject:connectedAndroidTest'). >>> >>> -- >>> Xavier Ducrohet >>> Android SDK Tech Lead >>> Google Inc. >>> http://developer.android.com | http://tools.android.com >>> >>> Please do not send me questions directly. Thanks! >>> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "adt-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Xavier Ducrohet > Android SDK Tech Lead > Google Inc. > http://developer.android.com | http://tools.android.com > > Please do not send me questions directly. Thanks! > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
