Open saied89 opened 5 years ago
@zigzago I can help with that, I just wonder if we don't want to merge "*-tests" modules to follow standard gradle structure. WDYT?
@dwlizlo the -tests modules are not in a /test test source folder because they need to be launched by more than one module.
For example, kmongo-core-tests
tests are used by kmongo
, kmongo-native
& kmongo-serialization
modules - the same tests are checked for different mapping engines.
I don't know what is the best way to configure this behaviour with gradle, but if there is a more elegant solution, I'm ok with it ;)
Separate -test modules and then importing them with testImplementation wouldn't work?
I am working on both going MPP (at least for the model not the implementation) and migration to Gradle. It would speed up the process a lot if I could talk with someone that explains to me the hierarchy of the project.
Maven and Gradle are similar but Gradle offers levels flexibility that could make the project better but requires decisions from someone who knows KMongo from inside out!
all sub modules are here: https://github.com/Litote/kmongo/blob/master/pom.xml#L31
kmongo uses kmongo-core (mongo sync driver extensions) & kmongo-jackson-mapping dependencies
kmongo-native uses kmongo-core & kmongo-native-mapping
kmongo-serialization uses kmongo-core & kmongo-serialization-mapping
kmongo-coroutine uses kmongo-coroutine-core & kmongo-jackson-mapping dependencies
kmongo-coroutine-native uses kmongo-coroutine-core & kmongo-native-mapping dependencies
etc.
tests are shared between mapping engines.
For example,
kmongo tests uses kmongo-core-tests & kmongo-jackson-mapping
kmongo-native tests uses uses kmongo-core-tests & kmongo-native-mapping
kmongo-coroutine-serialization tests uses kmongo-coroutine-core-tests & kmongo-serialization-mapping
etc.
JUnit Category (https://dzone.com/articles/grouping-tests-using-junit) are used for tests that are dedicated to specific engine - for example SerializationMappingCategory for kotlinx.serialization (https://github.com/Litote/kmongo/blob/master/kmongo-serialization/pom.xml#L57)
HTH and if you have any questions, please ask ;)
Any progress on this? I'm also working on a KMM project and would love to use this.
I was very busy during the last 2 months with university. Today I finally graduated 🎉🎊 I'll try to look into it during holidays 🎄🎄
I would also love to see this, anyone managed a work around?
Atm I am overriding my base serializable classes from commonsMain in jvmMain to include the _id
property.
However, this means I can no longer make the base classes data classes.
The issue is approaching it's 3yr birthday slowly. Are there any plans to fix this?
I will implement it for 4.3.0
Any news ?
Yes! This is planned for the inclusion in mongo github repository :)
Its really great that you've extracted Kmongo-Id so that it could be used in common modules. I tried to adapt it for Kotlin multi-platform but it can't be done because multi-platform is only supported on Gradle.
Please consider migrating to gradle and adding support for multi-platform.