diff --git a/.travis.yml b/.travis.yml index 0e184af..13919ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,16 @@ +sudo: false language: java jdk: - oraclejdk8 after_success: - - gradle coveralls + - " ./gradlew coveralls" +deploy: + provider: script + script: "./gradlew bintrayUpload" + on: + tags: true +env: + global: + - secure: "Ai47GDG9Hv60mIIVqgQbG9CLzftKnAg1J3h762byEk0tMUNNEfbnBHEiiX5YTduT93RF/zvvME9rn+ycvjFA5Q/KGQNLfQHdGMaAP+lfLQeT8FsiomV9QMGDjDYnF1KGXztZHGB3TOPs6KMwSAiO15QXoRQ+8p89UFphVKy1fmU=" + - secure: "CpKsnXu69uVUOUI9v4NiqpN3TR+/uWeCWjTvblrJDvZPuI/JWFKl/z2MyrgWmwDHi6G3Q0EGHSt+Y9f42jeH0IyGLJLrTc2W1SbjKkYscQGRLIH33MKVO0o30ltUWYnoySBOxs/8LM8MIKhrwtypzu0ewQoAvmteO9Za4RVkKAk=" diff --git a/build.gradle b/build.gradle index 088773a..7f8deec 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,11 @@ +plugins { + id "com.cinnober.gradle.semver-git" version "2.2.2" + id "com.github.kt3k.coveralls" version "2.4.0x" + id "com.jfrog.bintray" version "1.3.1" +} apply plugin: 'java' apply plugin: 'jacoco' -apply plugin: 'com.github.kt3k.coveralls' - -version = '0.4.0' +apply plugin: 'maven-publish' repositories { mavenCentral() @@ -33,16 +36,34 @@ jacocoTestReport { } } -buildscript { - repositories { - mavenCentral() - } +task wrapper(type: Wrapper) { + gradleVersion = '2.3' +} - dependencies { - classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1' - } +publishing { + publications { + bintrayPublication(MavenPublication) { + from components.java + groupId 'com.greghaskins' + artifactId 'spectrum' + version project.version + } + } } -task wrapper(type: Wrapper) { - gradleVersion = '2.3' +bintray { + user = System.getenv('BINTRAY_USER') + key = System.getenv('BINTRAY_KEY') + publish = true + publications = ['bintrayPublication'] + pkg { + repo = 'maven' + name = 'Spectrum' + licenses = ['MIT'] + vcsUrl = 'https://github.com/greghaskins/spectrum.git' + version { + name = project.version + released = new Date() + } + } }