nokeedev / gradle-native

The home of anything about Gradle support for natively compiled languages
https://nokee.dev
Apache License 2.0
47 stars 8 forks source link

Clarify the relationship between Nokee and Gradle Native #59

Open DanielSWolf opened 4 years ago

DanielSWolf commented 4 years ago

I'm new to Gradle Native, and I'm confused.

According to the Gradle documentation, the official plugins for native languages are cpp-application and cpp-library. When people talk about Gradle Native, these are the plugins they refer to. And it seems that these plugins only recently (2018) replaced an older set of native plugins (c, cpp, ...).

So there are the old official native plugins, the new official native plugins -- and there are the Nokee native plugins. So I'm wondering:

lacasseio commented 4 years ago

Thanks, Daniel for this issue. I agree with you there is some clarification to write. It was hard to vocalize where the project fits given some lacking feature with the older (software model) and newer (current model) plugins from the Gradle core. However, with the upcoming version 0.4 most of the gap will be bridged and version 0.5 should close the gap and even surpass for the most part. I would be grateful if you could comment here where was your landing point in learning about Nokee. It would help me improve the documentation and the website to address the concerns and questions you raised here.

Your original assessment is accurate. The older often referred to the software model plugins, are being phased out mostly because the software model as a whole is being deprecated. The newer plugins cpp-application and cpp-library (with the Swift counterpart) were developed to speed up the software model deprecation and removal. As far as I'm aware, the development was paused and the core native support is left in a particular state. The newer plugins are more rigid making their usage easier but greatly lack features when compared to the older plugins.

Nokee is a continuous effort aiming at bringing the great potential Gradle has for the native ecosystem to reality. I have been involved with the native support in Gradle for the past 8 years. Together with a previous employer, we contracted out Gradle to add support for native in Gradle. This led to the older plugins. They were great and showed a very promising opportunity for the native ecosystem. Then the development stopped. I joined Gradle and worked on the newer plugins. To my great sadness, the development stopped again. Finally, I left Gradle and started Nokee to bring a great vision to reality.

Am I correct in assuming that Nokee and cpp-application/cpp-library have the same purpose? Or is there a distinction I'm not aware of?

The first focus of Nokee was JNI library support which rides the fine line between Java and native. The upcoming version will have equivalent plugins to the newer core native plugins, that is cpp-application, cpp-library, swift-application and swift-library. In terms of features, there shouldn't be much difference. In terms of commitment, Nokee is a continuous effort in developing world-class native support in Gradle.

Is Nokee the official successor to cpp-application/cpp-library? Are these other plugins dead?

There hasn't been any discussion about Nokee being the official successor to cpp-application/cpp-library. To learn about the status of the core plugins, you will have to ask the Gradle team about it. I wish we could work together in cleaning up the confusion and remove any half measure what was developed but then again, Nokee is about 2 versions away from catching up with all the features offered by both newer and older core plugins.

Are the developers behind Nokee the same people that developed the other plugins? Or are there two separate teams at work?

Sort of. As I explained previously, I have being involved with both sets of plugins (as a user and a developer). I have a considerable understanding on what needs to be present to successfully address the pain in the native ecosystem. There is a lot of crossover between the software model concepts, the newer model concepts and Nokee. There are some tiny implementation differences here and there but the core concepts should be about the same. The Nokee plugins aim at offering the same plugin quality as you would expect from a core Gradle plugin. The testing infrastructure and practice are about the same. The documentation is of comparable quality (plus some the French idiom as I explaining thing ;-), feel free to comment on them so it can be improved).

For new native projects, should I choose Nokee or cpp-application/cpp-library?

I can't actively steer you away from the Gradle core plugins. If it works for your need then it may be a good choice. As the owner of the Nokee project, I would definitely be forever grateful for any feedback you may have to improve the plugins, documentation or features you wish could be provided out of the box. We can definitely have a chat on your needs and we can work together on a plan to improve to Nokee plugins to fit your needs. I haven't written any sample for the dev.nokee.cpp-application and dev.nokee.cpp-library plugins coming up in the next release. I only wrote a quick draft for the plugin reference chapters:

Sorry for the long explanation. Don't hesitate to ask more questions.

DanielSWolf commented 4 years ago

Thank you for taking the time to answer all of my questions! I understand much better now where Nokee stands compared to the other plugins. One thing that especially reassured me was to learn that you've been involved with Gradle Native for eight years now. That not only tells me that you know what you're doing, but also gives me confidence that you're in it for the long haul. 🙂

I'm currently starting work on a Kotlin JVM application that will make heavy use of C/C++ code through the JNI. Given that Nokee focuses on the JNI scenario, this seems like a great fit. So I'll certainly give Nokee a try!

Based on what you said about your progress, it probably makes sense for me to wait for your 0.5 release. Can you make any prediction yet about when it will be ready?

I'm not sure what you mean when you ask about my "landing point". I'll take it to mean how I first learned about Nokee. A few days back, I was researching Gradle Native and was looking for the source code repo of the official native plugins. (BTW, I still haven't found it. All I could find was a GitHub repo containing documentation and issues, but no source code.) In that process, I came upon your GitHub page. Its name nokeedev/gradle-native gave me a bit of a mixed message. On the one hand, gradle-native lead me to believe that this was an official part of Gradle Native; on the other hand, nokeedev had me assume that I had found a fork instead of the real thing. From there, I quickly went to your project homepage.

It would have helped me then if both the GitHub README and your homepage had contained one or two short sentences about the relationship to Gradle Native.

I'm looking forward to trying out Nokee, and I'll be glad to give you feedback on my experience!

DanielSWolf commented 4 years ago

Can you make a guess as to when Nokee 0.5 will be ready?

lacasseio commented 4 years ago

I'm aiming for a 0.5 release around mid-July. My question to you is what features are missing for your projects? Version 0.4 is pretty polish for JNI scenario and the missing features to be completed in 0.5 have lower impact of most organizations. We could work together on identifying the concrete missing features that I can deliver in a nightly. Version 0.4 is pretty much done, I'm finishing up the documentation and it's ready for release. The next version will start right after.

DanielSWolf commented 4 years ago

By bad! I meant to write 0.4, not 0.5.

lacasseio commented 4 years ago

I hope to release the next version in the next 7 days.

I'm currently finishing up the documentation and some test coverage for version 0.4. I don't expect any new major features or development to take place until it's release. If you pull any of the latest nightly (you can see all the versions here as sometimes they don't line up with the nightly website). It should be pretty much what is going to be released.

If you have major blockers for your project, I can see about squeezing a fix for the next release. You can ping me on the community Slack as well and we can talk about your needs.