Artifactory - . , com.jfrog.artifactory maven-publish, artifactoryPublish Gradle. ... , : ·)
build.gradle:
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'
publishing {
publications {
aar(MavenPublication) {
groupId 'com.fewlaps.something' //put here your groupId
artifactId 'productname' //put here your artifactId
version '7.42.0' //put here your library version
// Tell maven to prepare the generated "*.aar" file for publishing
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
}
}
}
artifactory {
contextUrl = 'https://your-artifactory-host.com/artifactory'
publish {
repository {
repoKey = "libs-release-local"
username = "username"
password = "password"
}
defaults {
// Tell the Artifactory Plugin which artifacts should be published to Artifactory.
publications('aar')
}
}
}
./gradlew artifactoryPublish
, , GitHub, .travis.yml
deploy:
- provider: script
script: ./gradlew artifactoryPublish
skip_cleanup: true
on:
tags: true
GitHub, , vX.X.X Travis:
# Build only master and "vX.X.X" tags to prevent flooding Travis machines
branches:
only:
- master
- /^v\d+\.\d+\.\d+$/