After migrating to gradle 2.4 maven-publish tasks ignored

See Change of behaviour for @Finalize between 2.3 and 2.4 release - #5 by Francois_Guillot
Since 2.4, tasks are not created if not used. Therefore your ‘matching’ logic does not work anymore.
See @luke_daley answer in the link above for workaround, waiting for the true solution
which will be to create a @Mutate rule between your releaseTask and the publishXXXToReleaseRepository tasks