title: Gradle disable all incremental compilation and parallel builds
body: <p>In a small set of sbt projects we needed a protobuf/grpc compilation, and because only Gradle has normal support for that we used it to just do the protobuf related tasks.</p>
  
  <p>Sometimes it will randomly fail compiling the very same thing and will succeed on retry, we determined that its because of incremental Java compilation.</p>
  
  <p>I want to disable all sorts of incubating features and incremental compilations, I want this thing to be deterministic.</p>
  
  <p>For that I tried </p>
  
  <pre><code>compileJava {
      //enable compilation in a separate daemon process
      options.fork = false
  
      //enable incremental compilation
      options.incremental = false
  }
  </code></pre>
  
  <p>but Gradle will still give output like this (apparently ignoring those flags)</p>
  
  <pre><code>Parallel execution is an incubating feature.
  Incremental java compilation is an incubating feature.
  :deleteGeneratedSource
  :clean
  :extractIncludeProto
  :extractProto UP-TO-DATE
  :generateProto
  :recompileProto
  </code></pre>
  
  <p><strong>So how do we disable parallel execution and incremental Java compilation?</strong></p>