Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.1 was compiled with JDK 19 and breaks compability #52

Closed
G00fY2 opened this issue Dec 19, 2023 · 2 comments
Closed

1.4.1 was compiled with JDK 19 and breaks compability #52

G00fY2 opened this issue Dec 19, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@G00fY2
Copy link

G00fY2 commented Dec 19, 2023

After updating to 1.4.1 we see the following error:

> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':classpath'.
      > Could not resolve ru.cian:plugin:1.4.1.
        Required by:
            project : > ru.cian.huawei-publish-gradle-plugin:ru.cian.huawei-publish-gradle-plugin.gradle.plugin:1.4.1
         > No matching variant of ru.cian:plugin:1.4.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 17, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.5' but:
             - Variant 'apiElements' capability ru.cian:plugin:1.4.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 19 and the consumer needed a component for use during runtime, compatible with Java 17
                 - Other compatible attribute:
                     - Doesn't say anything about org.gradle.plugin.api-version (required '8.5')
             - Variant 'runtimeElements' capability ru.cian:plugin:1.4.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 19 and the consumer needed a component, compatible with Java 17
                 - Other compatible attribute:
                     - Doesn't say anything about org.gradle.plugin.api-version (required '8.5')

I opened the "HuaweiPublishPlugin.class" with a hex editor and can clearly see, that the Java Class File Format is set to 00 3F = 63 = Java 19.

You should probably define the jvmTarget in you build.gradle to make sure the plugin is compiled with the desired Java version (otherwise it will pick the jvm version of the compiler that is being used.)

@cosic cosic added the bug Something isn't working label Dec 19, 2023
@cosic cosic self-assigned this Dec 19, 2023
@cosic
Copy link
Contributor

cosic commented Dec 19, 2023

@G00fY2 Hi! That's my fault. I forgot to switch on jdk17 when published plugin. Please try a new 1.4.2 plugin version. It's the same version but built with jdk17 intead of jdk19.

@G00fY2
Copy link
Author

G00fY2 commented Dec 19, 2023

Can confirm that 1.4.2 fixes this issue.

@cosic cosic closed this as completed Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants