title: How to change java version used by cordova subprojects
body: <p>I have a Cordova project, and I am building a android plugin for it. My plugin then uses a library that uses the diamond operation (&lt;>). I tried to run it but I receive this error : </p>
  
  <pre><code>diamond operator is not supported in -source 1.6
      ArrayList&lt;Node&gt; selectedProviders = new ArrayList&lt;&gt;();
                                                        ^
    (use -source 7 or higher to enable diamond operator)
  </code></pre>
  
  <p>When I run:</p>
  
  <pre><code>$ java -version
  java version "1.7.0_67"
  Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
  Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
  $ javac -version
  javac 1.7.0_67
  </code></pre>
  
  <p>I research before posting and some people resolved by changing the ant <code>config.xml</code> to </p>
  
  <pre><code>&lt;property name="java.target" value="1.7" /&gt;
  &lt;property name="java.source" value="1.7" /&gt;
  </code></pre>
  
  <p>But it didnt worked for me.</p>
  
  <p>I also tried make a <code>build-extra-gradle</code> file to set-up the <code>sourceCompatibility</code> and <code>targetCompatibility</code>, but it just appears to resolve the main project, not the subproject that I use on my plugin.</p>