I'm trying to publish a java lib to Bintray, and then using that lib in another project by defining the bintray repo in gradle.
This all works when deploying to Bintray from my local machine, but when I try to get it working from Travis CI it doesn't seem to publish properly.
When I try to add a dependency in a different gradle project it cannot find the artefact, even though I know where it is and that the files have been uploaded.
I have noticed that the maven-metadata.xml
doesn't seem to be created properly when I use Travis, I was under the impression that Bintray would create it for me.
.travis.yml
language: java
before_install:
- if [ -n "$TRAVIS_TAG" ]; then ./travis_prebuild.sh; fi
script:
- echo "Building artifacts"
- gradle clean build
- if [ -n "$TRAVIS_TAG" ]; then gradle createPom; fi
before_deploy:
- echo "Creating description file for bintray."
- ./travis_postbuild.sh
deploy:
provider: bintray
file: "descriptor.json"
user: $BINTRAY_USER
key: $BINTRAY_API_KEY
passphrase: $BINTRAY_GPG_PASSWORD
skip_cleanup: true
on:
tags: true
bintray-conf.json
{
"package": {
"name": "core",
"repo": "Qatja",
"subject": "wetcat",
"issue_tracker_url": "https://github.com/Qatja/core/issues",
"vcs_url": "https://github.com/Qatja/core.git",
"labels": ["MQTT", "Java"],
"public_download_numbers": true,
"public_stats": true
},
"version": {
"name": "@VERSION@",
"gpgSign": true
},
"files":
[
{"includePattern": "build/libs/(.*\.jar)", "uploadPattern": "@VERSION@/$1"},
{"includePattern": "build/(.*\.pom)", "uploadPattern": "@VERSION@/$1"}
],
"publish": true
}