What your company is doing is actually a very good practice to reproduce build. We usually call this “toolchain provisioning”. We have this sample that works for Clang and GCC (
https://github.com/gradle/native-samples/tree/lacasseio/improve-provisionable-toolchains/cpp/provisionable-tool-chains). The issue with MSVC is how to get a standalone “archive” of the installed MSVC. I think for legal reason, we can’t redistribute a self-contained, vetted, archive with just the compiler. In recent years, they allow installing only the compilers but Gradle checks some specific paths to “validate” the installation is “ok to use”. Unfortunately, that logic is quite annoying when doing toolchain provisioning. I would assume the MSVC dependency in your source control is missing one of those path. I may be just a matter of creating empty files to trick Gradle into thinking the installation is “ok to use”. When we take on the toolchain detection in Nokee, we want to make this process much more controllable in the sense that users should be able to express any toolchain
easily. Easily is a big word here because there’s a lot of things that relate to a toolchain such as the standard C library, the target architecture, the host architecture, etc. Ideally, we should have a deeper understanding of the MSVC installation and treat that as a “remote repositories” to pull all the various tools and libraries as dependencies.
The Gradle’s native development support may lack some maintenance but in general it’s still pretty good at supporting most native development scenario. What is lacking is conveniences to make the task much more painless. This is where Nokee steps in, we really want to create a painless environment to support native ecosystem. We are still addressing some debt most specifically a way to easily configure and compose complex native models. We provide basic models but those never quite cut it for complex native project. Instead, we want to provide the flexibility to compose native models that fully represent what you are building. Our general guideline is build complexity should be logarithmic not exponential.
I agree Gradle should make a statement about their native support. Nokee’s statement is to provide a painless native support for Gradle. It would be great to include Nokee in Gradle in some shape or form but that may go against the general idea of reducing Gradle distribution and instead focus on modules. We released a plugin that tries its best to bridge the gap between Nokee and Gradle. We hope to add more capabilities for distribution management (especially for airgap environment).