One large repo building AND release locally and USING plugin locally

There are build systems like google’s and twitter’s that build projects out of one HUGE repo.

I have something similar (but not quite as big) AND in that repo is a gradle plugin so I am wondering with gradle, is there a way to

  1. make project A depend on the ‘local release of gradle’
  2. build project A using the gradle plugin
  3. then on an official release, release all artifacts, the gradle plugin AND project A all to a maven repository

How would I define this in the gradle files?