Skip to content

Unable to build on Java 1.8 #385

@notsocafe

Description

@notsocafe

Steps to reproduce :
1 - Clone repository
2 - Run ./gradlew (or equivalent) to initialize dev environment

Complete log :

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'mc-image-helper'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve me.qoomon:gradle-git-versioning-plugin:6.4.3.
     Required by:
         project : > me.qoomon.git-versioning:me.qoomon.git-versioning.gradle.plugin:6.4.3
      > No matching variant of me.qoomon:gradle-git-versioning-plugin:6.4.3 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.1.1' but:
          - Variant 'apiElements' capability me.qoomon:gradle-git-versioning-plugin:6.4.3 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.1.1')
          - Variant 'javadocElements' capability me.qoomon:gradle-git-versioning-plugin:6.4.3 declares a component for use during runtime, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.1.1')
          - Variant 'runtimeElements' capability me.qoomon:gradle-git-versioning-plugin:6.4.3 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
              - 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 org.gradle.plugin.api-version (required '8.1.1')
          - Variant 'sourcesElements' capability me.qoomon:gradle-git-versioning-plugin:6.4.3 declares a component for use during runtime, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.1.1')
   > Could not resolve io.github.itzg:github-releaser-gradle-plugin:0.1.1.
     Required by:
         project : > io.github.itzg.github-releaser:io.github.itzg.github-releaser.gradle.plugin:0.1.1
      > No matching variant of io.github.itzg:github-releaser-gradle-plugin:0.1.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.1.1' but:
          - Variant 'apiElements' capability io.github.itzg:github-releaser-gradle-plugin:0.1.1 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.1.1')
          - Variant 'javadocElements' capability io.github.itzg:github-releaser-gradle-plugin:0.1.1 declares a component for use during runtime, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.1.1')
          - Variant 'runtimeElements' capability io.github.itzg:github-releaser-gradle-plugin:0.1.1 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.1.1')
          - Variant 'sourcesElements' capability io.github.itzg:github-releaser-gradle-plugin:0.1.1 declares a component for use during runtime, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.1.1')

Updating to a newer JDK (but older than 21) fixes the issue.
I haven't done Java in years and lack experience in Gradle, but I guess the error stems from dependencies requiring a newer Java version?
Metadata files describe the project as compatible with Java 1.8, unless I'm mistaken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions