title: How to add -Xlint:unchecked to Gradle *from command line*?
body: <p>Our old code bases use deprecated and unchecked APIs from time to time, and we get these in the output:</p>
  <pre><code>Note: C:\path\to\MyClass.java uses unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  </code></pre>
  <p>Ok, so how do I recompile with with <code>-Xlint:unchecked</code> from the command line, without changing <code>build.gradle</code>? Many other <a href="https://stackoverflow.com/a/28270322/345716">answers</a> show how to fix it by adding this to <code>build.gradle</code> (or similar to <code>build.gradle.kts</code>):</p>
  <pre><code>gradle.projectsEvaluated {
     tasks.withType(JavaCompile) {
          options.compilerArgs &lt;&lt; &quot;-Xlint:unchecked&quot; &lt;&lt; &quot;-Xlint:deprecation&quot;
      }
  }
  </code></pre>
  <p>but that requires editing files (creating git diffs) and is just a pain in the... Is there some way, environment variable, command-line option or something to add compiler args without touching the <code>build.gradle*</code> files?</p>