Конфигурация gradle для отправки артифакта на maven репозиторий Bintray
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
buildscript { repositories { jcenter() } dependencies { classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0' } } group 'javagrinko' version '1.0-SNAPSHOT' apply plugin: 'java' apply plugin: 'maven' apply plugin: "com.jfrog.bintray" //плагин для публикации apply plugin: 'maven-publish' //плагин для публикации maven артифактов bintray { user = LOGIN //this usually comes from gradle.properties file in ~/.gradle key = API_KEY //this usually comes from gradle.properties file in ~/.gradle // configurations = ['deployables'] //When uploading configuration files // - OR - publications = ['mavenJava'] //When uploading Maven-based publication files // - AND/OR - // filesSpec { //When uploading any arbitrary files ('filesSpec' is a standard Gradle CopySpec) // from 'arbitrary-files' // into 'standalone_files/level1' // rename '(.+)\\.(.+)', '$1-suffix.$2' // } dryRun = false //Whether to run this as dry-run, without deploying publish = true //If version should be auto published after an upload pkg { // repo = 'myrepo' repo = 'maven' // userOrg = 'myorg' //An optional organization name when the repo belongs to one of the user's orgs name = 'spring-tcp-controller' //licenses = ['Apache-2.0'] //publicDownloadNumbers = true } } /** * Нужная вещь */ publishing { publications { mavenJava(MavenPublication) { from components.java } } } |
Gradle-конфигурация с плагином Bintray