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.

Is Java 11 required?

See original GitHub issue

We’re currently in a pre-AGP 7.0 world where our CI forces us to be on Java 8, so I hit this issue when attempting to add marathon to the project.

Is it intentional that marathon requires Java 11? IMO it would make sense to align with the minimum required version of Marathon’s AGP version.

I checked the release notes and didn’t see anything about a Java 11 bump

> Task :buildSrc:generateExternalPluginSpecBuilders FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildSrc:generateExternalPluginSpecBuilders'.
> Could not resolve all files for configuration ':buildSrc:compileClasspath'.
   > Could not resolve com.malinskiy.marathon:marathon-gradle-plugin:0.7.0.
     Required by:
         project :buildSrc
      > No matching variant of com.malinskiy.marathon:marathon-gradle-plugin:0.7.0 was found. The consumer was configured to find an API of a library compatible with Java 8, preferably not packaged as a jar, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but:
          - Variant 'apiElements' capability com.malinskiy.marathon:marathon-gradle-plugin:0.7.0 declares an API of a library, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm':
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
          - Variant 'runtimeElements' capability com.malinskiy.marathon:marathon-gradle-plugin:0.7.0 declares a runtime of a library, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm':
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
   > Could not resolve com.malinskiy.marathon:configuration:0.7.0.
     Required by:
         project :buildSrc
      > No matching variant of com.malinskiy.marathon:configuration:0.7.0 was found. The consumer was configured to find an API of a library compatible with Java 8, preferably not packaged as a jar, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but:
          - Variant 'apiElements' capability com.malinskiy.marathon:configuration:0.7.0 declares an API of a library, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm':
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
          - Variant 'runtimeElements' capability com.malinskiy.marathon:configuration:0.7.0 declares a runtime of a library, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm':
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s
1 actionable task: 1 executed

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Malinskiycommented, Feb 8, 2022

Highly likely that this is just a missing block kotlinOptions.jvmTarget = "1.8" in the gradle plugin definition. Should be trivial to fix

0reactions
ZakTaccardicommented, Feb 9, 2022

note: I’d submit a PR but company VPN makes that difficult at the moment

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java 11 or more recent is required to run. Please download ...
The Eclipse platform has decided to require Java 11 as the minimum requirement for its September 2020 release. See Upgrading the Eclipse SDK...
Read more >
Oracle JDK 11 Certified System Configurations
For Certified System Configurations of other versions of the JDK and Java Mission Control visit: - System Requirements and Supported Platforms for other...
Read more >
URGENT- "Java 11 or more recent is required to run ... - GitHub
As the message states, JDK 11 is now required to run the vscode-java extension. See https://github.com/redhat-developer/vscode-java/wiki/JDK- ...
Read more >
Jenkins requires Java 11 or newer
Beginning with Jenkins 2.357, Jenkins requires Java 11.
Read more >
Reasons to move to Java 11 - Azure | Microsoft Learn
Transitioning to Java 11 can be done in a stepwise fashion. It is not required for code to use Java modules to run...
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