I have a project using the Gradle ‘cpp-exe’ building several c++ binaries on CentOS 6 using gcc. The binaries compile just fine. The problem that I’m having is finding documentation on how to (simply, or even at all) pull at tar or tar.gz artifact from a personal artifactory server. I haven’t seen any documentation that describes what happens.
- Where does it get downloaded to? - Do I have to unarchive the files myself? - How do I access the contents?
My artifacts contain headers and libraries that that my projects depend on. It seems like something should be simple since I don’t see other questions about this.
Yes, I know that there is an “artifactory plugin”, and i’m attempting to use that, however, all the documentation that I’ve seen for that is all about “publishing” as if pulling were so easy that a caveman could do it.
What you’re referring to is commonly called “dependency resolution”. For java projects, this works well using the ‘dependencies’ and ‘repositories’ configuration blocks. However, for a ‘cpp-exe’ project this isn’t yet supported: you’ll need to use gradle/groovy to download and unpack the dependencies yourself, then declare them in your build script as ‘prebuilt libraries’.
Prebuilt libraries are a new feature that is only available in the nightly build.
With Maven, If I have 2 projects, A and B. where B produces an artifact that A is dependent on, I can compile B and produce a snapshot artifact which get put in my local maven repository/cache. When I compile project A, it will pull the newest “SNAPSHOT” artifact for B and use it.
Will the dependency Resolution feature of the Gradle cpp plugin support this as well?
Is there a ball park time frame for this feature?
If its a long way off, then I’ll have to implement a workout solution for my company, however, I would prefer not to if the feature is only a few weeks away.
just wanted to follow up on this topic and ask whether the dependency resolution for external packages has already been implemented in gradle for the cpp plugin.