JetBrains / markdown

Markdown parser written in kotlin
Apache License 2.0
682 stars 75 forks source link

Version 0.1.45 on Maven Central requires JDK 11 #70

Closed martinbonnin closed 3 years ago

martinbonnin commented 3 years ago

Similar to this other issue, the latest release of 0.1.45 in Maven Central requires Java11 in its Gradle module file.

This wasn't an issue in the jcenter publication because it was published with a previous version of Gradle and did not include a .module file.

This will make build fail in setups were Maven Central has a higher precedence than Jcenter and using Java8.

2 possible solutions:

valich commented 3 years ago

Bummer. That was unexpected, sorry for breaking your builds. I have downgraded 0.1 branch to older gradle, and checked that the publication does not contain .module file anymore. I believe it will appear in central next morning.

valich commented 3 years ago

Joel has removed the .module file from faulty 0.1.45 release so builds should be fine again (after cleaning local module caches for org.jetbrains:markdown:0.1.45, if present). Please ping me if something still does not work.

ZacSweers commented 3 years ago

even after cleaning local caches and running with --rerun-dependencies, it still fails with the same issue

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'slack-android-ng'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.jetbrains:markdown:0.1.45.
     Required by:
         project : > slack.internal.gradle:slack-plugin:00047 > org.jetbrains.dokka:dokka-gradle-plugin:1.4.20 > org.jetbrains.dokka:dokka-core:1.4.20
      > No matching variant of org.jetbrains:markdown:0.1.45 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally but:
          - Variant 'apiElements' capability org.jetbrains:markdown:0.1.45 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
          - Variant 'javadocElements' capability org.jetbrains:markdown:0.1.45 declares a runtime of a component, 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)
          - Variant 'runtimeElements' capability org.jetbrains:markdown:0.1.45 declares a runtime of a library, 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
valich commented 3 years ago

@ZacSweers Did you clean the respective ~/.gradle/caches/modules-2/files-2.1/org.jetbrains/markdown local location? Which gradle version do you use? I don't really understand where can builds now get the java 11 requirement because there is no such mention along released files.

Does https://repo1.maven.org/maven2/org/jetbrains/markdown/0.1.45/markdown-0.1.45.module return 404 for you?

ZacSweers commented 3 years ago

It does return a 404 for me, but clearing that directory is not enough for me. Even if I clear all of ~/.gradle/caches and run with --refresh-dependencies

ZacSweers commented 3 years ago

I think the better solution would be to release a new 0.1.46 version to central and update dokka to depend on it. It can be identical in contents (but built for JDK 8), just something to beat the dependency resolution and caching. This would also allow people to easily fix locally without waiting for a dokka update to raise the transitive dependency.

valich commented 3 years ago

The 0.1.46 is released, just in case: https://mvnrepository.com/artifact/org.jetbrains/markdown/0.1.46

ZacSweers commented 3 years ago

forcing the newer version resolved things for us 👍. Thanks for the quick turnaround on this!