apply plugin: 'maven-publish' task sourcesJar(type: Jar) { from sourceSets.main.allSource classifier = 'sources' } task javadocJar(type: Jar) { from javadoc classifier = 'javadoc' } publishing { publications { maven(MavenPublication) { from components.java artifact sourcesJar artifact javadocJar pom { resolveStrategy = Closure.DELEGATE_FIRST description = "" name = "PlaguBot ${project.name}" url = "https://github.com/InsanusMokrassar/PlaguBot" scm { developerConnection = "scm:git:[fetch=]ssh://git@github.com/InsanusMokrassar/PlaguBot.git[push=]ssh://git@github.com/InsanusMokrassar/PlaguBot.git" url = "ssh://git@github.com/InsanusMokrassar/PlaguBot.git" } developers { developer { id = "InsanusMokrassar" name = "Aleksei Ovsiannikov" email = "ovsyannikov.alexey95@gmail.com" } } licenses { license { name = "Apache Software License 2.0" url = "https://github.com/InsanusMokrassar/PlaguBot/LICENSE" } } } repositories { maven { name = "bintray" url = uri("https://api.bintray.com/maven/${project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')}/PlaguBot/${project.name}/;publish=1;override=1") credentials { username = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER') password = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY') } } } } } }