How to publish artifacts generated by cpp plugin with gradle 1.11?

Hello everybody,

I’m having trouble publishing a native shared library to a maven repository.

As far as I know, I have to specify which artifacts to publish using an “archives” block. In the past (until gradle 1.10), the cpp-lib and cpp-exe plugins did that for me.

As these plugins have been removed with 1.11, I now wonder how I can achieve the same behaviour. I could not find any sample of how to properly define the archives block. I guess it’s more than just simple files, at least the code in the cpp-lib plugin looked more complicated.

So could anybody please help me filling the gap, that cpp-lib left behind?

PS: Here is the build.gradle I used with gradle 1.09:

apply plugin: 'cpp-lib'
  version = 0.1
  uploadArchives {
 repositories {
  maven {
   url '/path/to/repo'
  }
 }
}

The ‘cpp-exe’ and ‘cpp-lib’ plugins were removed because we’re developing a new model for publishing and resolving C++ artifacts, and these were getting in the way.

You should be able to get the old behaviour back with your own custom plugin, taking the code from the ‘cpp-lib’ plugin in 1.10 as an example: https://github.com/gradle/gradle/blob/RB_1.10/subprojects/cpp/src/main/groovy/org/gradle/nativebinar…

Please show gradle config for example

Is it now possible to do this in Gradle 2.0? Or does it still require creating a custom plugin from the old source?

I’m also interested in an example of publishing c++ artifacts to a repository in Gradle 2.x. I’m new to Gradle so I’m not really ready to write my own custom plugin, yet.