I spent some time looking into publishing my project, but I am a bit confused by those concepts:
-
artifacts { }
,configurations { }
and friends: What is good example of a real-world configuration? How do e.g. debian/redhatFlavors
, e.g. debug/releaseBuildTypes
, e.g. linux_amd64/windows_32NativePlatforms
and e.g. gcc/clangNativeToolChains
go together with it? What should be used to differentiate between binary package (containing only binary artifacts), develpment package (containing also headers) and source package (containing all sources)? -
publishing { }
anddistributions { }
: What is the difference between these two and how are they supposed to cooperate? - all the Maven/Ivy publishing plugins: How do these supposed to work with the above?
- Is there some example of publishing C++ project? (I saw very simple Hello World one, but something more closer to real-world would be appreciated.)
- Is there a way hot to install C++ project on current machine (equivalent of
make install
)? - None of native tasks (e.g.
CreateStaticLibrary
, which is literally creating an archive of object files,LinkSharedLibrary
, etc.) is inherited fromAbstractArchiveTask
(as opposed to e.g.Jar
) and therefore can not be used in very convinientartifacts { foo_configuration bar_library_task }
way and it is very hard to figure out what are all the files to be published for given platform (this is the case especially for shared libraries). Is there some good way how to let Gradle figure it out instead of scripting it myself?