Hi all,
I’m attempting to publish native artifacts to ArtifactoryOnline without cross-compiling everything in the same job on the same machine. I’m using classifiers to distinguish artifacts amongst our supported platforms, similar to what Maven Nar plugin does. While Jenkins has multi-configuration and multi-job plugins, there will still be independent Gradle tasks run on each machine.
On Windows:
$ ./gradlew publish
Upload https://…artifactoryonline.com/…/libs-snapshots-local/com/foo/bar/1.0.0-SNAPSHOT/bar-1.0.0-20160718.035552-1.pom
Upload https://…artifactoryonline.com/…/libs-snapshots-local/com/foo/bar/1.0.0-SNAPSHOT/bar-1.0.0-20160718.035552-1-headers.zip
Upload https://…artifactoryonline.com/…/libs-snapshots-local/com/foo/bar/1.0.0-SNAPSHOT/bar-1.0.0-20160718.035552-1-win.x64-exports.zip
Upload https://…artifactoryonline.com/…/libs-snapshots-local/com/foo/bar/1.0.0-SNAPSHOT/bar-1.0.0-20160718.035552-1-win.x64.vc14.zip
Upload https://…artifactoryonline.com/…/libs-snapshots-local/com/foo/bar/1.0.0-SNAPSHOT/bar-1.0.0-20160718.035552-1-win.x64.vc14-pdb.zip
On Linux:
$ ./gradlew publish
Upload https://…artifactoryonline.com/…/libs-snapshots-local/com/foo/bar/1.0.0-SNAPSHOT/bar-1.0.0-20160718.035556-8.pom
Upload https://…artifactoryonline.com/…/libs-snapshots-local/com/foo/bar/1.0.0-SNAPSHOT/bar-1.0.0-20160718.035556-8-headers.zip
Upload https://…artifactoryonline.com/…/libs-snapshots-local/com/foo/bar/1.0.0-SNAPSHOT/bar-1.0.0-20160718.035556-8-el6.x64.gcc44.zip
Obviously this overwrites the latest snapshot version for which only one platform has artifacts, e.g. Gradle on Windows no longer finds bar-1.0.0-20160718.035552-1-win.x64.vc14.zip.
I found one forum post that explains how Artifactory batches artifacts together. But I don’t know that either of Gradle’s Maven plugins has the flexibility to allow this, e.g. publish to com/foo/bar/1.0.0-SNAPSHOT but set timestamp in artifact names to join another batch.
Does anyone have a good solution for batching snapshots of artifacts?
Thanks!