tobiasdiez/EasyBind

Support Java version <14

piegamesde opened this issue · 2 comments

When I'm on a project that uses Java 12 and includes this project as dependency, compiling fails with:

      > Unable to find a matching variant of com.tobiasdiez:easybind:2.0.0-SNAPSHOT:20200716.170523-8:
          - Variant 'apiElements' capability com.tobiasdiez:easybind:2.0.0-SNAPSHOT:
              - Incompatible attribute:
                  - Required org.gradle.jvm.version '12' and found incompatible value '14'.
              - Other attributes:
                  - Required org.gradle.category 'library' and found compatible value 'library'.
                  - Required org.gradle.dependency.bundling 'external' and found compatible value 'external'.
                  - Required org.gradle.libraryelements 'classes' and found compatible value 'jar'.
                  - Found org.gradle.status 'integration' but wasn't required.
                  - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
          - Variant 'javadocElements' capability com.tobiasdiez:easybind:2.0.0-SNAPSHOT:
              - Incompatible attribute:
                  - Required org.gradle.category 'library' and found incompatible value 'documentation'.
              - Other attributes:
                  - Required org.gradle.dependency.bundling 'external' and found compatible value 'external'.
                  - Found org.gradle.docstype 'javadoc' but wasn't required.
                  - Required org.gradle.jvm.version '12' but no value provided.
                  - Required org.gradle.libraryelements 'classes' but no value provided.
                  - Found org.gradle.status 'integration' but wasn't required.
                  - Required org.gradle.usage 'java-api' and found compatible value 'java-runtime'.
          - Variant 'runtimeElements' capability com.tobiasdiez:easybind:2.0.0-SNAPSHOT:
              - Incompatible attribute:
                  - Required org.gradle.jvm.version '12' and found incompatible value '14'.
              - Other attributes:
                  - Required org.gradle.category 'library' and found compatible value 'library'.
                  - Required org.gradle.dependency.bundling 'external' and found compatible value 'external'.
                  - Required org.gradle.libraryelements 'classes' and found compatible value 'jar'.
                  - Found org.gradle.status 'integration' but wasn't required.
                  - Required org.gradle.usage 'java-api' and found compatible value 'java-runtime'.
          - Variant 'sourcesElements' capability com.tobiasdiez:easybind:2.0.0-SNAPSHOT:
              - Incompatible attribute:
                  - Required org.gradle.category 'library' and found incompatible value 'documentation'.
              - Other attributes:
                  - Required org.gradle.dependency.bundling 'external' and found compatible value 'external'.
                  - Found org.gradle.docstype 'sources' but wasn't required.
                  - Required org.gradle.jvm.version '12' but no value provided.
                  - Required org.gradle.libraryelements 'classes' but no value provided.
                  - Found org.gradle.status 'integration' but wasn't required.
                  - Required org.gradle.usage 'java-api' and found compatible value 'java-runtime'.

When I set the Java version of my project to 14 it then works. Would it be possible to use this project as a dependency in Java 11-13 projects as well?

JDK >= 9 should work now again, in the latest snapshot.

In principle, it should also work with JDK 8 (then without module support) but this is blocked by java9-modularity/gradle-modules-plugin#164 and somewhat java9-modularity/gradle-modules-plugin#137.

WFM, thx.