For single projects, it works great. But with subprojects, it either signs but doesn't publish, or publishes but doesn't sign.
There doesn't seem to be any official documentation from Gradle org showing an example of signing subprojects, and they don't seem to use the signing plugin themselves (which is a shame, because the Gradle source code has more than 100 subprojects, which would make for a very good example).
The gist of the problem is that trying to add the signing task in allprojects or subprojects results in Cannot add task 'signArchives' as a task with that name already exists., but any attempt to sign by some other means (for example, by moving it to an include file, and calling apply-from on that file from each project) removes the sign/publish task.
Other plugins/tasks, for example, jacoco, work fine when applied in allprojects or subprojects. This seems to be specific to the signing plugin. It might even be a bug in the signing plugin (shouldn't it namespace each apply with the project to which it is being applied?). I'd settle for a workaround that works.
Googling for an answer only found one other person who had encountered this problem, and that's where I got the include-file solution, except it removes the publish task.
Things I've tried are documented in detail in github, gradle issues 13419. Thus far there has been no response.