sourcemuse/GradleMongoPlugin — pull request #10 by jgibson (2014-10-21 03:01:19+00:00)
Title: Port randomization

I added port randomization as an option, similar to the Maven Mongo plugin. You enable it like so:

mongo {
randomPort = true
}

randomPort overrides a port setting. After one of the start mongo tasks executes the port property of the MongoPluginExtension will be set to the randomly selected port. I'm not sure if this is the best way to communicate the selected port to the rest of the build, but TaskOutputs seems to be focused on files and directories, not values.