There is no reason JavadocOptionFileWriterContext should use BufferedWriter instead of just the Writer.
Updated the javadoc option file writing test so that it makes more sense. Now it uses writer and asserts on actual output.
Ensured the javadoc file writing implementation and coverage works neatly on windows.
Added a comment that describes some gotchas around writing options file on windows.
Uncommented the javadoc integration test now.
Revert "Removed some redundant logic from DependencyGraphBuilder."

This reverts commit 327f2e34c3f7c72555ac56e1e5fbfa015b2712c2.
GRADLE-3099 Improved the multiline javadoc options for linux/mac. I was unable to make it working for windows. As of now, the behavior is improved on linux/max: line breaks will be handled automatically. On windows, the behavior is exactly the same, javadoc will barf with the same error.
Merge remote-tracking branch 'origin/master'