title: Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'
body: <p>Trying to deploy my app to heroku, but it keeps failing with the error:
  Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'</p>
  
  <p>I have my JAVA_HOME,JAVA_PATH,and so on.. set up, i have an image of all of them here, i think they are correct. If i check java -version, and javac -version, they both show java 11.</p>
  
  <p>I also tried putting to the root folder a system.properties.txt file and also instead of .txt a .gradle file with java.runtime.version=11   inside it.</p>
  
  <p>Also i have this in my build.gradle:</p>
  
  <pre><code>sourceCompatibility = JavaVersion.VERSION_11
  targetCompatibility = JavaVersion.VERSION_11
  </code></pre>
  
  <p>But it keeps installing jdk8 at the start of the deploy(git push heroku master) like this:</p>
  
  <pre><code>Gradle app detected
  remote: -----&gt; Spring Boot detected
  remote: -----&gt; Installing JDK 1.8... done
  remote: -----&gt; Building Gradle app...
  remote: -----&gt; executing ./gradlew build -x test
  remote:        Downloading https://services.gradle.org/distributions/gradle-5.4.1-all.zip
  </code></pre>
  
  <p>here are the Images of the deploy failing and the environmental variables that are set up.</p>
  
  <p><a href="https://i.stack.imgur.com/N4AoL.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/N4AoL.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/ITJgx.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/ITJgx.jpg" alt="enter image description here"></a></p>
  
  <p>I have been with this problem for a week now, i think i tried all, but i would be really greatful if someone could help me with this. Thank you!</p>