Kluent 2.0 Roadmap
See original GitHub issueI’d like to open a discussion about what we should do and drop with the next major version of Kluent. @javatarz did a lot of work to make Kluent independent of JUnit (and specific test runners in general), thanks for that!
During those PRs (#71 #72) we started a discussion about what we could do and what we could drop with the next major version. I would love to have a lot of feedback and opinions here 😃 We should atleast give @Egorand , @eburke56 , @javatarz, @guenhter and @goreRatzete a chance to state their opinions here 👍
Dropping support
Mocking
#73 Is already a proposal to drop the mocking features in Kluent. I do agree with @Egorand points and I think it fits into the “no opinion” discussion. If we don’t want to force an opinion on a test runner, we also shouldn’t do that on mocking. In the beginning of Kluent I started the mocking support with plain java Mockito which didn’t work out really well. Later we transitioned to mockito-kotlin and kept our API backwards compatible, but it still doesn’t feel great. Kluent doesn’t support all kinds of features that a mocking framework is bringing in and it also led to a lot of confusion (#62).
I can see multiple ways of doing this. We could either deprecate mocking in the next 1.x version and drop it completely in 2.x, don’t deprecate it (as in keep as it is) in 1.x and drop it in 2.x or also maintain it in 2.x.
Platform independence
Since Kotlin already supports other targets than the JVM (e.g. JavaScript) and more platforms are being worked on (Kotlin native) we could try to take this next major step to also be platform independent.
What that means is that we get rid of all external dependencies (e.g. JUnit) and only use builtin Kotlin functionality. @javatarz already experimented this within #72 and could give some insights on this. What we do need if we go into this direction is having tests builtin for each platform, to make sure we don’t break anything.
Even if we can get rid of our Java dependencies, we still have dependencies on the Java library, because we do have assertions for java.time.* and java.io.File. I’m not sure if we can be completely platform independent (as in Kotlin platforms) with just maintaining one project.
Having only one core artifact for the Kotlin stdlib and then platform specific assertions (dependent on the core artifact) for Java specific stuff, Android specific stuff and so on, aggregated into one Github organization, might be better in the future.
Android
I also see Android as a kind of another platform, because we are locked in Java 1.6 there. @eburke56 has already contributed logic into our buildsystem so that we can have a specific artifact for Android (e.g. no backtick names). I would definitely want to support Android further.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:33 (26 by maintainers)

Top Related StackOverflow Question
If we want Kluent to be truly platform independent, can we split out the JVM specific dependencies into a new library called
kluent-jvm(and possibilykluent-jvm-android)?What you end up with is
kluent(v2)kluent-jvmkluentjava.time.*andjava.io.File)We could go ahead and make the changes that you’re outlining in
kluentv2 and later start a JVM specific project. It’s important to note that until we createkluent-jvm, in most cases existing projects would find it really hard to move to the latest version.PS: If you’re looking for contributors/maintainers for future work, I’d be happy to help 😃
A few points I wanted to add:
kluent-jvmandkluent-android, the latter targeting Java 6, and the former targeting Java 8 (or Java 9)