question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JDK version determined incorrectly by Gradle on JDK 10

See original GitHub issue

https://github.com/policeman-tools/forbidden-apis/wiki/BundledSignatures “Gradle automatically add the compile Java version”

forbiddenApis {
  bundledSignatures = ['jdk-internal']
}

Error: Parsing signatures failed: Invalid bundled signature reference (JDK version is invalid): jdk-internal-1.10

Workaround:

forbiddenApis {
  bundledSignatures = ['jdk-internal-10']
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
uschindlercommented, Aug 29, 2018

I will release a new version anyways for compatibility with Java 11, so this fix should be out soon.

0reactions
uschindlercommented, Aug 29, 2018

I will commit this workaround and let Jenkins decide if it’s fine with Gradle:

targetCompatibility = { (project.targetCompatibility?.hasProperty('java11Compatible') && project.targetCompatibility?.java11Compatible) ?
  project.targetCompatibility.toString() : project.targetCompatibility?.majorVersion }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle: Could not determine java version from '11.0.2'
The obvious way, would be to update your project's gradle-wrapper to version 5.0. However, before updating, try running gradle app:installDebug ...
Read more >
Could not determine java version from '9.0.1' - Gradle Forums
I fixed it by changing distributionUrl in the file [project]\gradle\wrapper\gradle-wrapper.properties to point to disribution of version 4.3. ( ...
Read more >
Compatibility Guide for JDK 8 - Oracle
This document discusses types of potential incompatibilities relating to the JDK 8 release of the Java platform.
Read more >
Gradle import doesn't work with java 10 : IDEA-188526
Caused by: org.gradle.api.GradleException: Could not determine Java version using executable C:\Tools\JDK10\bin\java.exe.
Read more >
Wrong java (JDK version) in gradle and problems with building
Hey everyone! I Try to modding on 1.18.2 - Forge MDK 1.18.2 - 40.0.52. Modding on IntelliJ IDEA I Opened this MDK in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found