-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Publish a Version Built by Java 8 #26
Comments
See https://travis-ci.org/robstoll/atrium/jobs/642307833 for an example of the error this causes. |
hm... I don't thinks this is really necessary for kbox. The error of gradle can also be suppressed. But if we want separate releases, then we probably need a build for:
And since this sucks, I would say we drop jdk9 at least |
Why would we need different builds? Gradle accepts packages built on older JVMs for newer JVMs. Just not the other way around. |
https://docs.gradle.org/current/userguide/upgrading_version_5.html#automatic_target_jvm_version |
I still don’t understand why publishing this library built by JDK 8 would not fix the problem. From my understanding, it could then be used from any JVM >= 8. The link does not indicate anything else! Further Proof: robstoll/atrium#331 only fails on JVM 8, even though it is being tested on JVM 10 & 12. This shows that more recent JVM can still use gradle dependencies built by an older JVM. So why can’t we just publish a version |
Sorry, I have confused you. It would fix the problem gradle mentions. What I meant is that it is actually not a problem because KBox is using only jdk6 API with the exception of module-info.java, a jdk9 feature. Or in other words, it's totally fine to use it in a jdk8 project as long as there is not a classpath scrapper which cannot handle module-info.java So we would need to release two versions if we want to use module-info.java. |
Ah, now I see the problem. Thanks for explaining! There is a StackOverflow thread that explains how to achieve a single release that both uses a How does atrium do this? I thought that it was compatible with Java 8, but also uses I feel that we should fix this properly in kbox, because we will propagate the problem to users of atrium, won’t we? And if we want to stay compatible with JVM 8, we don’t want to tell all users to disable Gradle dependency version checking. |
You are right, the same problems applies to Atrium as well (it is also released with jdk9) so user using Gradle 6 + jdk8 + Atrium already see this problem today. jdk8 can handle modules-info.java that's why it's not really a problem but gradle thinks differently. It makes sense what gradle tells in other circumstances and I agree with you that we need a solution so that users are not blocked/run into this issue. Atrium provides an android artefact as the d8-compiler cannot (could not) handle module-info.class files. I suggest we:
Alternatively, we could first switch to the new MPP plugin of Kotlin (needs to be done in tutteli pl). With this we can easily introduce several JVM targets without much boilerplate (the current approach is not ideal). I would then suggest that we have:
|
If you want to, I can look into how we could adapt the tutteli plugins to support this. I would try to create an artifact that contains a |
Go for it. |
v0.14.2 released |
The latest version of kbox (
0.14.1
) was built using Java 9. This means that Gradle 6 will not accept the dependency when run on a version 8 JVM.Please publish a version of kbox built by Java 8.
The text was updated successfully, but these errors were encountered: